Patch #33785

Add missing fixture to TimelogControllerTest

Added by Yuichi HARADA 3 months ago. Updated 3 months ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Go MAEDA% Done:

0%

Category:Code cleanup/refactoring
Target version:4.2.0

Description

TimelogControllerTest has failed.

$ RAILS_ENV=test bundle exec rake db:migrate:reset

$ RAILS_ENV=test bundle exec rake test TEST=test/functional/timelog_controller_test.rb
Run options: --seed 11128

# Running:

........................................................S.................E

Error:
TimelogControllerTest#test_get_edit_with_an_existing_time_entry_with_locked_user:
ActiveRecord::RecordInvalid: Validation failed: Email cannot be blank
    test/functional/timelog_controller_test.rb:202:in `test_get_edit_with_an_existing_time_entry_with_locked_user'

bin/rails test test/functional/timelog_controller_test.rb:196

..................................

Finished in 6.473718s, 16.8373 runs/s, 51.5932 assertions/s.
109 runs, 334 assertions, 0 failures, 1 errors, 1 skips

You have skipped tests. Run with --verbose for details.

The cause was an insufficient fixture.

diff --git a/test/functional/timelog_controller_test.rb b/test/functional/timelog_controller_test.rb
index 3b7e10bde..77b2cd66e 100644
--- a/test/functional/timelog_controller_test.rb
+++ b/test/functional/timelog_controller_test.rb
@@ -21,7 +21,7 @@ require File.expand_path('../../test_helper', __FILE__)

 class TimelogControllerTest < Redmine::ControllerTest
   fixtures :projects, :enabled_modules, :roles, :members,
-           :member_roles, :issues, :time_entries, :users,
+           :member_roles, :issues, :time_entries, :users, :email_addresses,
            :trackers, :enumerations, :issue_statuses,
            :custom_fields, :custom_values,
            :projects_trackers, :custom_fields_trackers,

Associated revisions

Revision 19944
Added by Go MAEDA 3 months ago

Add missing fixture to TimelogControllerTest (#33785).

Patch by Yuichi HARADA.

History

#1 Updated by Go MAEDA 3 months ago

  • Status changed from New to Closed
  • Assignee set to Go MAEDA
  • Target version set to 4.2.0

Committed the fix. Thank you.

Also available in: Atom PDF