]> source.dussan.org Git - redmine.git/commitdiff
Adds a test for when query is not found.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Wed, 7 Mar 2012 20:00:38 +0000 (20:00 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Wed, 7 Mar 2012 20:00:38 +0000 (20:00 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9159 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/functional/issues_controller_test.rb

index d177a71c2bb43757395e6b9dd182847aa7231ede..9a52e9c8bfedf066630dd5828a73db586434ea49 100644 (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}