summaryrefslogtreecommitdiffstats
path: root/test/integration
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2023-01-20 03:31:41 +0000
committerGo MAEDA <maeda@farend.jp>2023-01-20 03:31:41 +0000
commit9d65eee4248acef921d102f1e614618514afcd51 (patch)
tree46bb18bdb4bcb47f399b9c27019e2fa46e6b33fa /test/integration
parent21eef7e65c5972cd65c183bf17e261fa67e34867 (diff)
downloadredmine-9d65eee4248acef921d102f1e614618514afcd51.tar.gz
redmine-9d65eee4248acef921d102f1e614618514afcd51.zip
Avoid double-render error with ApplicationController#find_optional_project (#38063).
Patch by Holger Just. git-svn-id: https://svn.redmine.org/redmine/trunk@22066 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/integration')
-rw-r--r--test/integration/application_test.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/integration/application_test.rb b/test/integration/application_test.rb
index d6caac41a..f80e9f81a 100644
--- a/test/integration/application_test.rb
+++ b/test/integration/application_test.rb
@@ -96,4 +96,19 @@ class ApplicationTest < Redmine::IntegrationTest
assert_response 302
end
end
+
+ def test_find_optional_project_should_not_error
+ Role.anonymous.remove_permission! :view_gantt
+ with_settings :login_required => '0' do
+ get '/projects/nonexistingproject/issues/gantt'
+ assert_response 302
+ end
+ end
+
+ def test_find_optional_project_should_render_404_for_logged_users
+ log_user('jsmith', 'jsmith')
+
+ get '/projects/nonexistingproject/issues/gantt'
+ assert_response 404
+ end
end