Replaces find(:first/:all) calls.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10931 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2012-12-03 21:30:10 +00:00
parent a7023dfa9b
commit ea296a109a
12 changed files with 56 additions and 45 deletions
+2 -2
View File
@@ -877,7 +877,7 @@ class IssueTest < ActiveSupport::TestCase
# Closing issue 1
issue1.init_journal(User.first, "Closing issue1")
issue1.status = IssueStatus.find :first, :conditions => {:is_closed => true}
issue1.status = IssueStatus.where(:is_closed => true).first
assert issue1.save
# 2 and 3 should be also closed
assert issue2.reload.closed?
@@ -896,7 +896,7 @@ class IssueTest < ActiveSupport::TestCase
# Closing issue 2
issue2.init_journal(User.first, "Closing issue2")
issue2.status = IssueStatus.find :first, :conditions => {:is_closed => true}
issue2.status = IssueStatus.where(:is_closed => true).first
assert issue2.save
# 1 should not be also closed
assert !issue1.reload.closed?