summaryrefslogtreecommitdiffstats
path: root/test/unit/journal_observer_test.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-12-03 18:21:32 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-12-03 18:21:32 +0000
commit31c33f462d92aead29b8feb6445d8fe5626c4963 (patch)
tree0818c626e553e1cbb606e9c23a7342583288d448 /test/unit/journal_observer_test.rb
parent013c6fe009e74892659c64c2936a2668a9663985 (diff)
downloadredmine-31c33f462d92aead29b8feb6445d8fe5626c4963.tar.gz
redmine-31c33f462d92aead29b8feb6445d8fe5626c4963.zip
Replaces find(:first) calls.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10928 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/journal_observer_test.rb')
-rw-r--r--test/unit/journal_observer_test.rb36
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