@@ -2261,25 +2261,26 @@ def test_show_should_format_related_issues_dates
2261
2261
end
2262
2262
2263
2263
def test_show_should_not_disclose_relations_to_invisible_issues
2264
- Setting . cross_project_issue_relations = '1'
2265
- IssueRelation .
2266
- create! (
2267
- :issue_from => Issue . find ( 1 ) ,
2268
- :issue_to => Issue . find ( 2 ) ,
2269
- :relation_type => 'relates'
2270
- )
2271
- # Relation to a private project issue
2272
- IssueRelation .
2273
- create! (
2274
- :issue_from => Issue . find ( 1 ) ,
2275
- :issue_to => Issue . find ( 4 ) ,
2276
- :relation_type => 'relates'
2277
- )
2278
- get ( :show , :params => { :id => 1 } )
2279
- assert_response :success
2280
- assert_select 'div#relations' do
2281
- assert_select 'a' , :text => /#2$/
2282
- assert_select 'a' , :text => /#4$/ , :count => 0
2264
+ with_settings :cross_project_issue_relations => '1' do
2265
+ IssueRelation .
2266
+ create! (
2267
+ :issue_from => Issue . find ( 1 ) ,
2268
+ :issue_to => Issue . find ( 2 ) ,
2269
+ :relation_type => 'relates'
2270
+ )
2271
+ # Relation to a private project issue
2272
+ IssueRelation .
2273
+ create! (
2274
+ :issue_from => Issue . find ( 1 ) ,
2275
+ :issue_to => Issue . find ( 4 ) ,
2276
+ :relation_type => 'relates'
2277
+ )
2278
+ get ( :show , :params => { :id => 1 } )
2279
+ assert_response :success
2280
+ assert_select 'div#relations' do
2281
+ assert_select 'a' , :text => /#2$/
2282
+ assert_select 'a' , :text => /#4$/ , :count => 0
2283
+ end
2283
2284
end
2284
2285
end
2285
2286
0 commit comments