diff options
Diffstat (limited to 'test/functional/wiki_controller_test.rb')
-rw-r--r-- | test/functional/wiki_controller_test.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/functional/wiki_controller_test.rb b/test/functional/wiki_controller_test.rb index 98fc20038..3673c7622 100644 --- a/test/functional/wiki_controller_test.rb +++ b/test/functional/wiki_controller_test.rb @@ -552,6 +552,16 @@ class WikiControllerTest < ActionController::TestCase assert_select 'span.diff_in', :text => 'Line added' end + def test_diff_with_invalid_version_should_respond_with_404 + get :diff, :project_id => 1, :id => 'CookBook_documentation', :version => '99' + assert_response 404 + end + + def test_diff_with_invalid_version_from_should_respond_with_404 + get :diff, :project_id => 1, :id => 'CookBook_documentation', :version => '99', :version_from => '98' + assert_response 404 + end + def test_annotate get :annotate, :project_id => 1, :id => 'CookBook_documentation', :version => 2 assert_response :success @@ -576,6 +586,11 @@ class WikiControllerTest < ActionController::TestCase } end + def test_annotate_with_invalid_version_should_respond_with_404 + get :annotate, :project_id => 1, :id => 'CookBook_documentation', :version => '99' + assert_response 404 + end + def test_get_rename @request.session[:user_id] = 2 get :rename, :project_id => 1, :id => 'Another_page' |