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
This commit is contained in:
Jean-Philippe Lang 2012-03-07 20:00:38 +00:00
parent 0cbbb9fda8
commit 67e8d1113e
1 changed files with 5 additions and 0 deletions

View File

@ -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}