]> source.dussan.org Git - redmine.git/commitdiff
Explicitly set Setting.cross_project_issue_relations to prevent random test failure...
authorGo MAEDA <maeda@farend.jp>
Thu, 13 Jan 2022 01:20:43 +0000 (01:20 +0000)
committerGo MAEDA <maeda@farend.jp>
Thu, 13 Jan 2022 01:20:43 +0000 (01:20 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@21364 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/functional/issue_relations_controller_test.rb

index f42b123c8912f817d90b7912799cd32fa8deb5f4..e34716df4ac5ecb0addf61541b4fae419b6d3bc3 100644 (file)
@@ -267,16 +267,18 @@ class IssueRelationsControllerTest < Redmine::ControllerTest
   end
 
   def test_bulk_create_should_show_errors
-    assert_difference 'IssueRelation.count', +3 do
-      post :create, :params => {
-        :issue_id => 1,
-        :relation => {
-          :issue_to_id => '1,2,3,4,5,7',
-          :relation_type => 'relates',
-          :delay => ''
-        }
-      },
-      :xhr => true
+    with_settings :cross_project_issue_relations => '0' do
+      assert_difference 'IssueRelation.count', +3 do
+        post :create, :params => {
+          :issue_id => 1,
+          :relation => {
+            :issue_to_id => '1,2,3,4,5,7',
+            :relation_type => 'relates',
+            :delay => ''
+          }
+        },
+        :xhr => true
+      end
     end
 
     assert_response :success