mirror of
https://github.com/redmine/redmine.git
synced 2025-11-08 14:26:04 +01:00
Repository tab is not displayed if no repository is set as the main repository (#33953).
Patch by Yuichi HARADA. git-svn-id: https://svn.redmine.org/redmine/trunk@21741 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -28,7 +28,8 @@ class MenuManagerTest < Redmine::IntegrationTest
|
||||
:roles,
|
||||
:member_roles,
|
||||
:members,
|
||||
:enabled_modules
|
||||
:enabled_modules,
|
||||
:repositories
|
||||
|
||||
def test_project_menu_with_specific_locale
|
||||
get '/projects/ecookbook/issues',
|
||||
@@ -80,6 +81,34 @@ class MenuManagerTest < Redmine::IntegrationTest
|
||||
end
|
||||
end
|
||||
|
||||
def test_project_menu_should_display_repository_tab_when_exists_repository
|
||||
project = Project.find('ecookbook')
|
||||
repos = project.repositories
|
||||
assert_equal true, repos.exists?
|
||||
|
||||
log_user('jsmith', 'jsmith')
|
||||
|
||||
assert_equal true, repos.exists?(:is_default => true)
|
||||
get '/projects/ecookbook'
|
||||
assert_select '#main-menu' do
|
||||
assert_select 'a.repository', :count => 1
|
||||
end
|
||||
|
||||
repos.update_all(:is_default => false)
|
||||
assert_equal false, repos.exists?(:is_default => true)
|
||||
get '/projects/ecookbook'
|
||||
assert_select '#main-menu' do
|
||||
assert_select 'a.repository', :count => 1
|
||||
end
|
||||
|
||||
repos.delete_all
|
||||
assert_equal false, repos.exists?
|
||||
get '/projects/ecookbook'
|
||||
assert_select '#main-menu' do
|
||||
assert_select 'a.repository', :count => 0
|
||||
end
|
||||
end
|
||||
|
||||
def test_main_menu_should_select_projects_tab_on_project_list
|
||||
get '/projects'
|
||||
assert_select '#main-menu' do
|
||||
|
||||
Reference in New Issue
Block a user