mirror of
https://github.com/meineerde/redmine.git
synced 2025-12-19 15:01:14 +00:00
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
This commit is contained in:
parent
19224b8e85
commit
f50ef21465
@ -177,21 +177,22 @@ class IssueRelationsControllerTest < Redmine::ControllerTest
|
|||||||
end
|
end
|
||||||
|
|
||||||
def test_should_create_relations_with_visible_issues_only
|
def test_should_create_relations_with_visible_issues_only
|
||||||
Setting.cross_project_issue_relations = '1'
|
with_settings :cross_project_issue_relations => '1' do
|
||||||
assert_nil Issue.visible(User.find(3)).find_by_id(4)
|
assert_nil Issue.visible(User.find(3)).find_by_id(4)
|
||||||
|
|
||||||
assert_no_difference 'IssueRelation.count' do
|
assert_no_difference 'IssueRelation.count' do
|
||||||
post(
|
post(
|
||||||
:create,
|
:create,
|
||||||
:params => {
|
:params => {
|
||||||
:issue_id => 1,
|
:issue_id => 1,
|
||||||
:relation => {
|
:relation => {
|
||||||
:issue_to_id => '4',
|
:issue_to_id => '4',
|
||||||
:relation_type => 'relates',
|
:relation_type => 'relates',
|
||||||
:delay => ''
|
:delay => ''
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
)
|
||||||
)
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user