]> source.dussan.org Git - redmine.git/commitdiff
use with_settings at ReportsControllerTest#test_get_issue_report_details_by_tracker_s...
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Thu, 10 Dec 2020 13:34:54 +0000 (13:34 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Thu, 10 Dec 2020 13:34:54 +0000 (13:34 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@20616 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/functional/reports_controller_test.rb

index 45ee72cb742521405db55a453a68899da2efabed..c33174d3d5c105fa5e412f9407aaad6140d6b523 100644 (file)
@@ -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'