@@ -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. |
|
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. |
|
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