mirror of
https://github.com/meineerde/redmine.git
synced 2026-01-31 19:47:14 +00:00
Don't show "History" tab for content in Filesystem repository (#37585).
Patch by Go MAEDA. git-svn-id: https://svn.redmine.org/redmine/trunk@21800 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
7808923421
commit
6f22f25ac2
@ -8,7 +8,7 @@ tabs << { name: 'entry', label: :button_view,
|
||||
|
||||
tabs << { name: 'changes', label: :label_history,
|
||||
url: {:action => 'changes', :id => @project, :repository_id => @repository.identifier_param, :path => to_path_param(@path), :rev => @rev }
|
||||
}
|
||||
} if @repository.supports_all_revisions?
|
||||
tabs << { name: 'annotate', label: :button_annotate,
|
||||
url: {:action => 'annotate', :id => @project, :repository_id => @repository.identifier_param, :path => to_path_param(@path), :rev => @rev }
|
||||
} if @repository.supports_annotate?
|
||||
|
||||
@ -202,6 +202,24 @@ class RepositoriesFilesystemControllerTest < Redmine::RepositoryControllerTest
|
||||
@project.reload
|
||||
assert_nil @project.repository
|
||||
end
|
||||
|
||||
def test_show_should_only_show_view_tab
|
||||
get(
|
||||
:entry,
|
||||
:params => {
|
||||
:id => PRJ_ID,
|
||||
:repository_id => @repository.id,
|
||||
:path => repository_path_hash(['test'])[:param]
|
||||
}
|
||||
)
|
||||
assert_response :success
|
||||
assert @repository.supports_cat?
|
||||
assert_select 'a#tab-entry', :text => /View/
|
||||
assert_not @repository.supports_all_revisions?
|
||||
assert_select 'a#tab-changes', 0
|
||||
assert_not @repository.supports_annotate?
|
||||
assert_select 'a#tab-annotate', 0
|
||||
end
|
||||
else
|
||||
puts "Filesystem test repository NOT FOUND. Skipping functional tests !!!"
|
||||
def test_fake; assert true end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user