diff options
Diffstat (limited to 'test/unit/journal_observer_test.rb')
-rw-r--r-- | test/unit/journal_observer_test.rb | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/test/unit/journal_observer_test.rb b/test/unit/journal_observer_test.rb index e9049ac8e..d54228210 100644 --- a/test/unit/journal_observer_test.rb +++ b/test/unit/journal_observer_test.rb @@ -29,8 +29,8 @@ class JournalObserverTest < ActiveSupport::TestCase # context: issue_updated notified_events def test_create_should_send_email_notification_with_issue_updated - issue = Issue.find(:first) - user = User.find(:first) + issue = Issue.first + user = User.first journal = issue.init_journal(user, issue) with_settings :notified_events => %w(issue_updated) do @@ -40,8 +40,8 @@ class JournalObserverTest < ActiveSupport::TestCase end def test_create_should_not_send_email_notification_with_notify_set_to_false - issue = Issue.find(:first) - user = User.find(:first) + issue = Issue.first + user = User.first journal = issue.init_journal(user, issue) journal.notify = false @@ -52,8 +52,8 @@ class JournalObserverTest < ActiveSupport::TestCase end def test_create_should_not_send_email_notification_without_issue_updated - issue = Issue.find(:first) - user = User.find(:first) + issue = Issue.first + user = User.first journal = issue.init_journal(user, issue) with_settings :notified_events => [] do @@ -64,8 +64,8 @@ class JournalObserverTest < ActiveSupport::TestCase # context: issue_note_added notified_events def test_create_should_send_email_notification_with_issue_note_added - issue = Issue.find(:first) - user = User.find(:first) + issue = Issue.first + user = User.first journal = issue.init_journal(user, issue) journal.notes = 'This update has a note' @@ -76,8 +76,8 @@ class JournalObserverTest < ActiveSupport::TestCase end def test_create_should_not_send_email_notification_without_issue_note_added - issue = Issue.find(:first) - user = User.find(:first) + issue = Issue.first + user = User.first journal = issue.init_journal(user, issue) journal.notes = 'This update has a note' @@ -89,8 +89,8 @@ class JournalObserverTest < ActiveSupport::TestCase # context: issue_status_updated notified_events def test_create_should_send_email_notification_with_issue_status_updated - issue = Issue.find(:first) - user = User.find(:first) + issue = Issue.first + user = User.first issue.init_journal(user, issue) issue.status = IssueStatus.last @@ -101,8 +101,8 @@ class JournalObserverTest < ActiveSupport::TestCase end def test_create_should_not_send_email_notification_without_issue_status_updated - issue = Issue.find(:first) - user = User.find(:first) + issue = Issue.first + user = User.first issue.init_journal(user, issue) issue.status = IssueStatus.last @@ -114,8 +114,8 @@ class JournalObserverTest < ActiveSupport::TestCase # context: issue_priority_updated notified_events def test_create_should_send_email_notification_with_issue_priority_updated - issue = Issue.find(:first) - user = User.find(:first) + issue = Issue.first + user = User.first issue.init_journal(user, issue) issue.priority = IssuePriority.last @@ -126,8 +126,8 @@ class JournalObserverTest < ActiveSupport::TestCase end def test_create_should_not_send_email_notification_without_issue_priority_updated - issue = Issue.find(:first) - user = User.find(:first) + issue = Issue.first + user = User.first issue.init_journal(user, issue) issue.priority = IssuePriority.last |