summaryrefslogtreecommitdiffstats
path: root/test/unit/repository_test.rb
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2014-01-09 05:08:54 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2014-01-09 05:08:54 +0000
commit56a40b35793af0ad57d4077bfeed8a2539dba4cc (patch)
tree0e3febd9a59eeaa7ebdd58fe92870440f07d7ac5 /test/unit/repository_test.rb
parent95bc7bf189ca4733ce2920447f078612581a4002 (diff)
downloadredmine-56a40b35793af0ad57d4077bfeed8a2539dba4cc.tar.gz
redmine-56a40b35793af0ad57d4077bfeed8a2539dba4cc.zip
Rails4: replace deprecated find_all_by_* at RepositoryTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12558 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/repository_test.rb')
-rw-r--r--test/unit/repository_test.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/unit/repository_test.rb b/test/unit/repository_test.rb
index 43c62376c..2bdd8c872 100644
--- a/test/unit/repository_test.rb
+++ b/test/unit/repository_test.rb
@@ -175,7 +175,7 @@ class RepositoryTest < ActiveSupport::TestCase
def test_destroy_should_delete_parents_associations
changeset = Changeset.find(102)
- changeset.parents = Changeset.find_all_by_id([100, 101])
+ changeset.parents = Changeset.where(:id => [100, 101]).all
assert_difference 'Changeset.connection.select_all("select * from changeset_parents").count', -2 do
Repository.find(10).destroy
end
@@ -183,7 +183,7 @@ class RepositoryTest < ActiveSupport::TestCase
def test_destroy_should_delete_issues_associations
changeset = Changeset.find(102)
- changeset.issues = Issue.find_all_by_id([1, 2])
+ changeset.issues = Issue.where(:id => [1, 2]).all
assert_difference 'Changeset.connection.select_all("select * from changesets_issues").count', -2 do
Repository.find(10).destroy
end