diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2014-11-23 13:36:01 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2014-11-23 13:36:01 +0000 |
commit | e0a034164f3409336f686cfa381da8a5db15c40e (patch) | |
tree | e4bd9590116c03026375a3ae5c618e01cd7bddc3 /test/unit/wiki_test.rb | |
parent | 1ada789a6ccbbbaa55adc3a661ea7cef917d4b71 (diff) | |
download | redmine-e0a034164f3409336f686cfa381da8a5db15c40e.tar.gz redmine-e0a034164f3409336f686cfa381da8a5db15c40e.zip |
Move wiki page to other project (#5450).
git-svn-id: http://svn.redmine.org/redmine/trunk@13643 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/wiki_test.rb')
-rw-r--r-- | test/unit/wiki_test.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/unit/wiki_test.rb b/test/unit/wiki_test.rb index a852b2393..22573221b 100644 --- a/test/unit/wiki_test.rb +++ b/test/unit/wiki_test.rb @@ -97,4 +97,18 @@ class WikiTest < ActiveSupport::TestCase assert_kind_of WikiPage, @wiki.sidebar assert_equal 'Sidebar', @wiki.sidebar.title end + + def test_destroy_should_remove_redirects_from_the_wiki + WikiRedirect.create!(:wiki_id => 1, :title => 'Foo', :redirects_to_wiki_id => 2, :redirects_to => 'Bar') + + Wiki.find(1).destroy + assert_equal 0, WikiRedirect.where(:wiki_id => 1).count + end + + def test_destroy_should_remove_redirects_to_the_wiki + WikiRedirect.create!(:wiki_id => 2, :title => 'Foo', :redirects_to_wiki_id => 1, :redirects_to => 'Bar') + + Wiki.find(1).destroy + assert_equal 0, WikiRedirect.where(:redirects_to_wiki_id => 1).count + end end |