Patch #31865

Add missing fixtures to ImportsControllerTest

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

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

0%

Category:Code cleanup/refactoring
Target version:4.1.0

Description

ImportsControllerTest#test_post_run_with_notifications has failed.

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

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

# Running:

............F

Failure:
ImportsControllerTest#test_post_run_with_notifications [test/functional/imports_controller_test.rb:275]:
Expected: 6
  Actual: 3

bin/rails test test/functional/imports_controller_test.rb:240

..

Finished in 2.226044s, 6.7384 runs/s, 30.5475 assertions/s.
15 runs, 68 assertions, 1 failures, 0 errors, 0 skips

I think that because the fixtures is not enough.

diff --git a/test/functional/imports_controller_test.rb b/test/functional/imports_controller_test.rb
index 871a08346..ed9024306 100644
--- a/test/functional/imports_controller_test.rb
+++ b/test/functional/imports_controller_test.rb
@@ -21,7 +21,7 @@ require File.expand_path('../../test_helper', __FILE__)

 class ImportsControllerTest < Redmine::ControllerTest
   fixtures :projects, :enabled_modules,
-           :users, :email_addresses,
+           :users, :email_addresses, :user_preferences,
            :roles, :members, :member_roles,
            :issues, :issue_statuses,
            :trackers, :projects_trackers,

Associated revisions

Revision 18357
Added by Go MAEDA 4 months ago

Add missing fixtures to ImportsControllerTest (#31865).

Patch by Yuichi HARADA.

History

#1 Updated by Go MAEDA 4 months ago

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

Committed the fix. Thanks.

Also available in: Atom PDF