From: Toshi MARUYAMA Date: Mon, 26 Oct 2020 13:36:20 +0000 (+0000) Subject: use with_settings at IssuesControllerTest#test_index_with_project_and_subprojects X-Git-Tag: 4.2.0~613 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=9bb9287970282f86f62f37b903ce6f08411484c4;p=redmine.git use with_settings at IssuesControllerTest#test_index_with_project_and_subprojects git-svn-id: http://svn.redmine.org/redmine/trunk@20204 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb index 66d71a5cd..c46cded59 100644 --- a/test/functional/issues_controller_test.rb +++ b/test/functional/issues_controller_test.rb @@ -109,13 +109,14 @@ class IssuesControllerTest < Redmine::ControllerTest end def test_index_with_project_and_subprojects - Setting.display_subprojects_issues = 1 - get(:index, :params => {:project_id => 1}) - assert_response :success + with_settings :display_subprojects_issues => '1' do + get(:index, :params => {:project_id => 1}) + assert_response :success - assert_select 'a[href="/issues/1"]', :text => /Cannot print recipes/ - assert_select 'a[href="/issues/5"]', :text => /Subproject issue/ - assert_select 'a[href="/issues/6"]', 0 + assert_select 'a[href="/issues/1"]', :text => /Cannot print recipes/ + assert_select 'a[href="/issues/5"]', :text => /Subproject issue/ + assert_select 'a[href="/issues/6"]', 0 + end end def test_index_with_project_and_subprojects_should_show_private_subprojects_with_permission