diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2007-12-15 11:57:06 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2007-12-15 11:57:06 +0000 |
commit | 361c50c1f410ce575631bfb59cfdcdf5353d331b (patch) | |
tree | 3eaa736a4c1773f693d6b7139ad3a436520b47ac /test/functional/wikis_controller_test.rb | |
parent | 27d6334afaceb95a4fdad4a3691cf22429a8e64e (diff) | |
download | redmine-361c50c1f410ce575631bfb59cfdcdf5353d331b.tar.gz redmine-361c50c1f410ce575631bfb59cfdcdf5353d331b.zip |
Added some functional tests (wiki).
git-svn-id: http://redmine.rubyforge.org/svn/trunk@999 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/wikis_controller_test.rb')
-rw-r--r-- | test/functional/wikis_controller_test.rb | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/test/functional/wikis_controller_test.rb b/test/functional/wikis_controller_test.rb index a343fdaaf..93ad7e32d 100644 --- a/test/functional/wikis_controller_test.rb +++ b/test/functional/wikis_controller_test.rb @@ -31,7 +31,7 @@ class WikisControllerTest < Test::Unit::TestCase User.current = nil end - def test_create_wiki + def test_create @request.session[:user_id] = 1 assert_nil Project.find(3).wiki post :edit, :id => 3, :wiki => { :start_page => 'Start page' } @@ -40,4 +40,17 @@ class WikisControllerTest < Test::Unit::TestCase assert_not_nil wiki assert_equal 'Start page', wiki.start_page end + + def test_destroy + @request.session[:user_id] = 1 + post :destroy, :id => 1, :confirm => 1 + assert_redirected_to 'projects/settings/1' + assert_nil Project.find(1).wiki + end + + def test_not_found + @request.session[:user_id] = 1 + post :destroy, :id => 999, :confirm => 1 + assert_response 404 + end end |