File tree Expand file tree Collapse file tree 2 files changed +20
-3
lines changed
test/integration/lib/redmine Expand file tree Collapse file tree 2 files changed +20
-3
lines changed Original file line number Diff line number Diff line change 367
367
:param => :project_id ,
368
368
:if =>
369
369
Proc . new do |p |
370
- if Setting . display_subprojects_issues ?
371
- p . rolled_up_versions . any?
370
+ if p . shared_versions . any ?
371
+ true
372
372
else
373
- p . shared_versions . any?
373
+ Setting . display_subprojects_issues? && p . rolled_up_versions . any?
374
374
end
375
375
end
376
376
)
Original file line number Diff line number Diff line change @@ -147,4 +147,21 @@ def test_project_menu_should_show_roadmap_if_subprojects_have_versions
147
147
assert_select '#main-menu a.roadmap' , 0
148
148
end
149
149
end
150
+
151
+ def test_project_menu_should_show_roadmap_if_project_has_shared_version
152
+ Version . delete_all
153
+ project = Project . generate! ( :parent_id => 2 )
154
+
155
+ Version . generate! ( project_id : 2 , sharing : 'tree' )
156
+
157
+ with_settings :display_subprojects_issues => '1' do
158
+ get "/projects/#{ project . id } "
159
+ assert_select '#main-menu a.roadmap'
160
+ end
161
+
162
+ with_settings :display_subprojects_issues => '0' do
163
+ get "/projects/#{ project . id } "
164
+ assert_select '#main-menu a.roadmap'
165
+ end
166
+ end
150
167
end
You can’t perform that action at this time.
0 commit comments