@@ -153,8 +153,7 class RepositoryTest < ActiveSupport::TestCase | |||||
153 | def test_destroy_should_delete_parents_associations |
|
153 | def test_destroy_should_delete_parents_associations | |
154 | changeset = Changeset.find(102) |
|
154 | changeset = Changeset.find(102) | |
155 | changeset.parents = Changeset.find_all_by_id([100, 101]) |
|
155 | changeset.parents = Changeset.find_all_by_id([100, 101]) | |
156 |
|
156 | assert_difference 'Changeset.connection.select_all("select * from changeset_parents").count', -2 do | ||
157 | assert_difference 'Changeset.connection.select_all("select * from changeset_parents").size', -2 do |
|
|||
158 | Repository.find(10).destroy |
|
157 | Repository.find(10).destroy | |
159 | end |
|
158 | end | |
160 | end |
|
159 | end | |
@@ -162,8 +161,7 class RepositoryTest < ActiveSupport::TestCase | |||||
162 | def test_destroy_should_delete_issues_associations |
|
161 | def test_destroy_should_delete_issues_associations | |
163 | changeset = Changeset.find(102) |
|
162 | changeset = Changeset.find(102) | |
164 | changeset.issues = Issue.find_all_by_id([1, 2]) |
|
163 | changeset.issues = Issue.find_all_by_id([1, 2]) | |
165 |
|
164 | assert_difference 'Changeset.connection.select_all("select * from changesets_issues").count', -2 do | ||
166 | assert_difference 'Changeset.connection.select_all("select * from changesets_issues").size', -2 do |
|
|||
167 | Repository.find(10).destroy |
|
165 | Repository.find(10).destroy | |
168 | end |
|
166 | end | |
169 | end |
|
167 | end |
General Comments 0
You need to be logged in to leave comments.
Login now