Project

General

Profile

Actions

Defect #41795

closed

Missing fixture: a test does not pass if the 'issue_categories' fixtures are not already loaded

Added by Vincent Robert about 1 month ago. Updated 28 days ago.

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

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

While running the tests in isolation, I noticed that one test failed.
If the 'issue_categories' fixtures are not already loaded, the test does not pass.

Minitest::Assertion: "View all issues (3 open)" not found in "1 issue(s) that are assigned to you are due in the next 7 days::

* eCookbook - Bug #15: Assigned to group (Due in 5 days)

View all issues (2 open)
http://localhost:3000/issues?assigned_to_id=me&set_filter=1&sort=due_date%3Aasc

-- 
You have received this notification because you have either subscribed to it, or are involved in it.
To change your notification preferences, please click here: http://hostname/my/account
" 
test/test_helper.rb:248:in `assert_include'
test/test_helper.rb:270:in `assert_mail_body_match'
test/unit/mailer_test.rb:935:in `block (2 levels) in test_reminder_should_include_issues_assigned_to_groups'
test/unit/mailer_test.rb:926:in `each'
test/unit/mailer_test.rb:926:in `block in test_reminder_should_include_issues_assigned_to_groups'
test/test_helper.rb:102:in `with_settings'
test/unit/mailer_test.rb:905:in `test_reminder_should_include_issues_assigned_to_groups'

I therefore suggest adding it to this test:

diff --git a/test/unit/mailer_test.rb b/test/unit/mailer_test.rb
index 2cb5c4ca4..b4f4c8f23 100644
--- a/test/unit/mailer_test.rb
+++ b/test/unit/mailer_test.rb
@@ -31,7 +31,7 @@ class MailerTest < ActiveSupport::TestCase
            :wikis, :wiki_pages, :wiki_contents, :wiki_content_versions,
            :versions,
            :comments,
-           :groups_users, :watchers
+           :groups_users, :watchers, :issue_categories

   def setup
     ActionMailer::Base.deliveries.clear
Actions

Also available in: Atom PDF