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 2 months ago. Updated about 2 months 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 #1

Updated by Go MAEDA 2 months ago

  • Status changed from New to Confirmed
  • Target version set to 5.1.5
Actions #2

Updated by Alma Way about 2 months ago

<deleted form spam>

Actions #3

Updated by Vincent Robert about 2 months ago

Can you please lock the "Alma way" account? It's obviously an AI bot which tries to create links to other websites. (By the way, we could add a "No Follow" attribute on the links in the notes. It may be a new option to add to Redmine)

Actions #4

Updated by Marius BĂLTEANU about 2 months ago

Vincent Robert wrote in #note-3:

Can you please lock the "Alma way" account? It's obviously an AI bot which tries to create links to other websites. (By the way, we could add a "No Follow" attribute on the links in the notes. It may be a new option to add to Redmine)

Done.

Actions #5

Updated by Marius BĂLTEANU about 2 months ago

  • Category set to Code cleanup/refactoring
  • Status changed from Confirmed to Resolved
  • Assignee set to Marius BĂLTEANU
  • Resolution set to Fixed

Patch committed, thanks!

Actions #6

Updated by Marius BĂLTEANU about 2 months ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF