summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-12-03 21:30:10 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-12-03 21:30:10 +0000
commitea296a109a8655ea48c02c1d0a9bb0d19002d236 (patch)
tree08b5e517e77e341cfdd5a23d649dd1e754074dd4 /test
parenta7023dfa9b8e39e6e0a73e57d22823e8a4260b71 (diff)
downloadredmine-ea296a109a8655ea48c02c1d0a9bb0d19002d236.tar.gz
redmine-ea296a109a8655ea48c02c1d0a9bb0d19002d236.zip
Replaces find(:first/:all) calls.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10931 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r--test/integration/account_test.rb2
-rw-r--r--test/unit/issue_test.rb4
2 files changed, 3 insertions, 3 deletions
diff --git a/test/integration/account_test.rb b/test/integration/account_test.rb
index 36349cf7d..075301dfb 100644
--- a/test/integration/account_test.rb
+++ b/test/integration/account_test.rb
@@ -45,7 +45,7 @@ class AccountTest < ActionController::IntegrationTest
# User logs in with 'autologin' checked
post '/login', :username => user.login, :password => 'admin', :autologin => 1
assert_redirected_to '/my/page'
- token = Token.find :first
+ token = Token.first
assert_not_nil token
assert_equal user, token.user
assert_equal 'autologin', token.action
diff --git a/test/unit/issue_test.rb b/test/unit/issue_test.rb
index 2bf748682..1ef94c636 100644
--- a/test/unit/issue_test.rb
+++ b/test/unit/issue_test.rb
@@ -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?