]> source.dussan.org Git - redmine.git/commitdiff
Add test for #39894.
authorMarius Balteanu <marius.balteanu@zitec.com>
Thu, 21 Dec 2023 06:54:28 +0000 (06:54 +0000)
committerMarius Balteanu <marius.balteanu@zitec.com>
Thu, 21 Dec 2023 06:54:28 +0000 (06:54 +0000)
git-svn-id: https://svn.redmine.org/redmine/trunk@22539 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/functional/watchers_controller_test.rb

index 239a0418c650bd6f65284af986424bf36cf94d70..30662480dac964700d5c5b2102ce299b1afb874f 100644 (file)
@@ -156,6 +156,12 @@ class WatchersControllerTest < Redmine::ControllerTest
     assert_match /ajax-modal/, response.body
   end
 
+  def test_new_as_html_should_respond_with_404
+    @request.session[:user_id] = 2
+    get :new, :params => {:object_type => 'issue', :object_id => '2'}
+    assert_response 404
+  end
+
   def test_new_for_message
     @request.session[:user_id] = 2
     get :new, :params => {:object_type => 'message', :object_id => '1'}, :xhr => true