Actions
Patch #32929
closedAdd missing fixtures to AttachmentsControllerTest
Description
AttachmentsControllerTest has failed.
$ RAILS_ENV=test bundle exec rake db:migrate:reset
$ RAILS_ENV=test bundle exec rake test TEST=test/functional/attachments_controller_test.rb
Run options: --seed 55811
# Running:
......................................E
Error:
AttachmentsControllerTest#test_destroy_issue_attachment:
NoMethodError: undefined method `high?' for nil:NilClass
app/models/issue.rb:1045:in `notified_users'
app/models/journal.rb:147:in `notified_users'
app/models/mailer.rb:130:in `deliver_issue_edit'
app/models/journal.rb:322:in `send_notification'
app/controllers/attachments_controller.rb:156:in `destroy'
lib/redmine/sudo_mode.rb:64:in `sudo_mode'
test/functional/attachments_controller_test.rb:586:in `block (2 levels) in test_destroy_issue_attachment'
test/functional/attachments_controller_test.rb:585:in `block in test_destroy_issue_attachment'
test/functional/attachments_controller_test.rb:584:in `test_destroy_issue_attachment'
bin/rails test test/functional/attachments_controller_test.rb:580
.........
Finished in 2.985696s, 16.0767 runs/s, 48.5649 assertions/s.
48 runs, 145 assertions, 0 failures, 1 errors, 0 skips
I think that because the fixtures not enough.
diff --git a/test/functional/attachments_controller_test.rb b/test/functional/attachments_controller_test.rb
index a3442f6a3..bf889892d 100644
--- a/test/functional/attachments_controller_test.rb
+++ b/test/functional/attachments_controller_test.rb
@@ -20,9 +20,9 @@
require File.expand_path('../../test_helper', __FILE__)
class AttachmentsControllerTest < Redmine::ControllerTest
- fixtures :users, :projects, :roles, :members, :member_roles,
+ fixtures :users, :user_preferences, :projects, :roles, :members, :member_roles,
:enabled_modules, :issues, :trackers, :attachments,
- :versions, :wiki_pages, :wikis, :documents
+ :versions, :wiki_pages, :wikis, :documents, :enumerations
def setup
User.current = nil
Actions