##// END OF EJS Templates
Rails4: replace deprecated find_all_by_* at RepositoryTest...
Toshi MARUYAMA -
r12283:56a40b35793a
parent child
Show More
@@ -175,7 +175,7 class RepositoryTest < ActiveSupport::TestCase
175
175
176 def test_destroy_should_delete_parents_associations
176 def test_destroy_should_delete_parents_associations
177 changeset = Changeset.find(102)
177 changeset = Changeset.find(102)
178 changeset.parents = Changeset.find_all_by_id([100, 101])
178 changeset.parents = Changeset.where(:id => [100, 101]).all
179 assert_difference 'Changeset.connection.select_all("select * from changeset_parents").count', -2 do
179 assert_difference 'Changeset.connection.select_all("select * from changeset_parents").count', -2 do
180 Repository.find(10).destroy
180 Repository.find(10).destroy
181 end
181 end
@@ -183,7 +183,7 class RepositoryTest < ActiveSupport::TestCase
183
183
184 def test_destroy_should_delete_issues_associations
184 def test_destroy_should_delete_issues_associations
185 changeset = Changeset.find(102)
185 changeset = Changeset.find(102)
186 changeset.issues = Issue.find_all_by_id([1, 2])
186 changeset.issues = Issue.where(:id => [1, 2]).all
187 assert_difference 'Changeset.connection.select_all("select * from changesets_issues").count', -2 do
187 assert_difference 'Changeset.connection.select_all("select * from changesets_issues").count', -2 do
188 Repository.find(10).destroy
188 Repository.find(10).destroy
189 end
189 end
General Comments 0
You need to be logged in to leave comments. Login now