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