summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-12-03 22:29:59 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-12-03 22:29:59 +0000
commit46fe61d51e8b8dc4966d9e2fb80d0d5f44bb7706 (patch)
tree6ce9e7b89ef482db83c9324d2ffda00c4fac82a4
parent4cc4e8bfd3a87ec4434d13e5091c0a7dd4e69233 (diff)
downloadredmine-46fe61d51e8b8dc4966d9e2fb80d0d5f44bb7706.tar.gz
redmine-46fe61d51e8b8dc4966d9e2fb80d0d5f44bb7706.zip
Adds tests for when showing/deleting an invalid issue.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10937 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--test/functional/issues_controller_test.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb
index 7efaa22e5..4a69019a9 100644
--- a/test/functional/issues_controller_test.rb
+++ b/test/functional/issues_controller_test.rb
@@ -1405,6 +1405,11 @@ class IssuesControllerTest < ActionController::TestCase
assert @response.body.starts_with?('%PDF')
end
+ def test_show_invalid_should_respond_with_404
+ get :show, :id => 999
+ assert_response 404
+ end
+
def test_get_new
@request.session[:user_id] = 2
get :new, :project_id => 1, :tracker_id => 1
@@ -3813,6 +3818,14 @@ class IssuesControllerTest < ActionController::TestCase
assert_response 302
end
+ def test_destroy_invalid_should_respond_with_404
+ @request.session[:user_id] = 2
+ assert_no_difference 'Issue.count' do
+ delete :destroy, :id => 999
+ end
+ assert_response 404
+ end
+
def test_default_search_scope
get :index
assert_tag :div, :attributes => {:id => 'quick-search'},