From: Toshi MARUYAMA Date: Thu, 10 Dec 2020 13:34:54 +0000 (+0000) Subject: use with_settings at ReportsControllerTest#test_get_issue_report_details_by_tracker_s... X-Git-Tag: 4.2.0~203 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=0cc5b52ac5536ab21a7683082223f1a1c5638a0b;p=redmine.git use with_settings at ReportsControllerTest#test_get_issue_report_details_by_tracker_should_show_only_statuses_used_by_the_project git-svn-id: http://svn.redmine.org/redmine/trunk@20616 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/test/functional/reports_controller_test.rb b/test/functional/reports_controller_test.rb index 45ee72cb7..c33174d3d 100644 --- a/test/functional/reports_controller_test.rb +++ b/test/functional/reports_controller_test.rb @@ -102,18 +102,14 @@ class ReportsControllerTest < Redmine::ControllerTest end def test_get_issue_report_details_by_tracker_should_show_only_statuses_used_by_the_project - Setting.stubs(:display_subprojects_issues?).returns(false) WorkflowTransition.delete_all WorkflowTransition.create(:role_id => 1, :tracker_id => 1, :old_status_id => 1, :new_status_id => 5) WorkflowTransition.create(:role_id => 1, :tracker_id => 1, :old_status_id => 1, :new_status_id => 4) WorkflowTransition.create(:role_id => 1, :tracker_id => 1, :old_status_id => 2, :new_status_id => 5) WorkflowTransition.create(:role_id => 1, :tracker_id => 2, :old_status_id => 1, :new_status_id => 6) - - get :issue_report_details, :params => { - :id => 1, - :detail => 'tracker' - } - + with_settings :display_subprojects_issues => '0' do + get(:issue_report_details, :params => {:id => 1, :detail => 'tracker'}) + end assert_response :success assert_select 'table.list tbody :nth-child(1)' do assert_select 'td', :text => 'Bug'