From: Jean-Philippe Lang Date: Wed, 7 Mar 2012 20:00:38 +0000 (+0000) Subject: Adds a test for when query is not found. X-Git-Tag: 1.4.0~189 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=67e8d1113ef0d6b84cb03744ecab97db5715d157;p=redmine.git Adds a test for when query is not found. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9159 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb index d177a71c2..9a52e9c8b 100644 --- a/test/functional/issues_controller_test.rb +++ b/test/functional/issues_controller_test.rb @@ -262,6 +262,11 @@ class IssuesControllerTest < ActionController::TestCase assert_equal 1, session[:query][:project_id] end + def test_index_with_invalid_query_id_should_respond_404 + get :index, :project_id => 1, :query_id => 999 + assert_response 404 + end + def test_index_with_cross_project_query_in_session_should_show_project_issues q = Query.create!(:name => "test", :user_id => 2, :is_public => false, :project => nil) @request.session[:query] = {:id => q.id, :project_id => 1}