Project

General

Profile

Actions

Patch #33786

closed

Add missing fixture to UsersControllerTest

Added by Yuichi HARADA over 4 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Code cleanup/refactoring
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:

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,
Actions #1

Updated by Go MAEDA over 4 years ago

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

Committed the patch. Thank you.

Actions

Also available in: Atom PDF