Fixed that changesets parents associations are not deleted when deleting a repository.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8847 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2012-02-11 14:17:47 +00:00
parent 17d5118de6
commit 8f92121606
2 changed files with 16 additions and 1 deletions
+9
View File
@@ -74,6 +74,15 @@ class RepositoryTest < ActiveSupport::TestCase
end
end
def test_destroy_should_delete_parents_associations
changeset = Changeset.find(102)
changeset.parents = Changeset.find_all_by_id([100, 101])
assert_difference 'Changeset.connection.select_all("select * from changeset_parents").size', -2 do
Repository.find(10).destroy
end
end
def test_should_not_create_with_disabled_scm
# disable Subversion
with_settings :enabled_scm => ['Darcs', 'Git'] do