diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-07-13 21:55:13 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-07-13 21:55:13 +0000 |
commit | fc07ba2a99fd7610f33de44e529ac7e518f48586 (patch) | |
tree | 890874d846bf86c7b53586f706c41031945f86af /test/unit/repository_test.rb | |
parent | 0eba42423af05a5507b8b1889b6904d5d5a5f79c (diff) | |
download | redmine-fc07ba2a99fd7610f33de44e529ac7e518f48586.tar.gz redmine-fc07ba2a99fd7610f33de44e529ac7e518f48586.zip |
Clear changesets and changes with raw sql when deleting a repository (#1627).
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1666 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/repository_test.rb')
-rw-r--r-- | test/unit/repository_test.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/unit/repository_test.rb b/test/unit/repository_test.rb index 03d836ef7..9ea9fdd45 100644 --- a/test/unit/repository_test.rb +++ b/test/unit/repository_test.rb @@ -45,6 +45,16 @@ class RepositoryTest < Test::Unit::TestCase assert_equal repository, project.repository
end + def test_destroy + changesets = Changeset.count(:all, :conditions => "repository_id = 10") + changes = Change.count(:all, :conditions => "repository_id = 10", :include => :changeset) + assert_difference 'Changeset.count', -changesets do + assert_difference 'Change.count', -changes do + Repository.find(10).destroy + end + end + end + def test_should_not_create_with_disabled_scm # disable Subversion Setting.enabled_scm = ['Darcs', 'Git'] |