Patch #33786

Add missing fixture to UsersControllerTest

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

UsersControllerTest has failed.

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

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

# Running:

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

Failure:
UsersControllerTest#test_show_should_list_all_emails [test/functional/users_controller_test.rb:265]:
<(?-mix:Email:)> expected but was
<My account>..
Expected 0 to be >= 1.

bin/rails test test/functional/users_controller_test.rb:258

Finished in 3.531463s, 15.8575 runs/s, 57.7664 assertions/s.
56 runs, 204 assertions, 1 failures, 0 errors, 0 skips

The cause was an insufficient fixture.

diff --git a/test/functional/users_controller_test.rb b/test/functional/users_controller_test.rb
index 0362d1fc8..5b9c51dd9 100644
--- a/test/functional/users_controller_test.rb
+++ b/test/functional/users_controller_test.rb
@@ -22,7 +22,7 @@ require File.expand_path('../../test_helper', __FILE__)
 class UsersControllerTest < Redmine::ControllerTest
   include Redmine::I18n

-  fixtures :users, :email_addresses, :projects, :members, :member_roles, :roles,
+  fixtures :users, :user_preferences, :email_addresses, :projects, :members, :member_roles, :roles,
            :custom_fields, :custom_values, :groups_users,
            :auth_sources,
            :enabled_modules,

Associated revisions

Revision 19943
Added by Go MAEDA 3 months ago

Add missing fixture to UsersControllerTest (#33786).

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 patch. Thank you.

Also available in: Atom PDF