From 32bfefa1c40715eee2f768b910af6a7349902fdd Mon Sep 17 00:00:00 2001 From: Antonio Terceiro Date: Mon, 19 Dec 2011 11:26:39 +0000 Subject: [PATCH] Move "no crash" tests for doc controller to integration tests --- test/functional/doc_controller_test.rb | 7 ------- test/integration/online_doc_test.rb | 15 +++++++++++++++ 2 files changed, 15 insertions(+), 7 deletions(-) create mode 100644 test/integration/online_doc_test.rb diff --git a/test/functional/doc_controller_test.rb b/test/functional/doc_controller_test.rb index 03abd98..35ba553 100644 --- a/test/functional/doc_controller_test.rb +++ b/test/functional/doc_controller_test.rb @@ -59,11 +59,4 @@ class DocControllerTest < ActionController::TestCase get :topic, :section => 'user', :topic => 'accepting-friends' end - should 'bail out gracefully for unexisting sections or topics' do - assert_nothing_raised do - get :section, :section => 'something-very-unlikely' - get :section, :section => 'something-very-unlikely', :topic => 'other-thing-very-unlikely' - end - end - end diff --git a/test/integration/online_doc_test.rb b/test/integration/online_doc_test.rb new file mode 100644 index 0000000..4cf1124 --- /dev/null +++ b/test/integration/online_doc_test.rb @@ -0,0 +1,15 @@ +require "#{File.dirname(__FILE__)}/../test_helper" + +class OnlineDocTest < ActionController::IntegrationTest + + def test_404_section + get '/doc/something-very-unlikely' + assert_response 404 + end + + def test_404_topic + get '/doc/something-very-unlikely/unexisting-topic' + assert_response 404 + end + +end -- libgit2 0.21.2