summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2020-12-11 14:18:33 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2020-12-11 14:18:33 +0000
commitf50ef21465919b13e94a2e91ff0b149975e56774 (patch)
treee0ac7266cac48ee279bb8643845da0ec17f21226
parent19224b8e85c7182cf3723b4a8be373f73acff6a3 (diff)
downloadredmine-f50ef21465919b13e94a2e91ff0b149975e56774.tar.gz
redmine-f50ef21465919b13e94a2e91ff0b149975e56774.zip
use with_settings at IssueRelationsControllerTest#test_should_create_relations_with_visible_issues_only
git-svn-id: http://svn.redmine.org/redmine/trunk@20630 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--test/functional/issue_relations_controller_test.rb27
1 files changed, 14 insertions, 13 deletions
diff --git a/test/functional/issue_relations_controller_test.rb b/test/functional/issue_relations_controller_test.rb
index cbf2ca6a4..024172adb 100644
--- a/test/functional/issue_relations_controller_test.rb
+++ b/test/functional/issue_relations_controller_test.rb
@@ -177,21 +177,22 @@ class IssueRelationsControllerTest < Redmine::ControllerTest
end
def test_should_create_relations_with_visible_issues_only
- Setting.cross_project_issue_relations = '1'
- assert_nil Issue.visible(User.find(3)).find_by_id(4)
+ with_settings :cross_project_issue_relations => '1' do
+ assert_nil Issue.visible(User.find(3)).find_by_id(4)
- assert_no_difference 'IssueRelation.count' do
- post(
- :create,
- :params => {
- :issue_id => 1,
- :relation => {
- :issue_to_id => '4',
- :relation_type => 'relates',
- :delay => ''
+ assert_no_difference 'IssueRelation.count' do
+ post(
+ :create,
+ :params => {
+ :issue_id => 1,
+ :relation => {
+ :issue_to_id => '4',
+ :relation_type => 'relates',
+ :delay => ''
+ }
}
- }
- )
+ )
+ end
end
end