Actions
Patch #31131
closedCalendarsControllerTest#test_show fails depending on the date
Description
CalendarsControllerTest#test_show failed when running test on 2019/4/1.
Failure: CalendarsControllerTest#test_show [test/functional/calendars_controller_test.rb:62]: Expected at least 1 element matching "img[class="gravatar"]", found 0.. Expected 0 to be >= 1.
When test data was created on 2019/4/1, issues_002 was not included in the April calendar.
CalendarsControllerTest#test_show failed because it was dependent on issues_002.
The following changes confirmed that the test was successful.
diff --git a/test/functional/calendars_controller_test.rb b/test/functional/calendars_controller_test.rb
index 69e0053adc..624ae49f67 100644
--- a/test/functional/calendars_controller_test.rb
+++ b/test/functional/calendars_controller_test.rb
@@ -36,6 +36,9 @@ class CalendarsControllerTest < Redmine::ControllerTest
:users, :email_addresses
def test_show
+ # for gravatar test
+ Issue.generate!(:start_date => User.current.today, :assigned_to_id => 2)
+
with_settings :gravatar_enabled => '1' do
get :show, :params => {
:project_id => 1
Actions