Project

General

Profile

Defect #37585 » 37585.patch

Go MAEDA, 2022-09-03 17:01

View differences:

app/views/repositories/_link_to_functions.html.erb
8 8

  
9 9
tabs << { name: 'changes', label: :label_history,
10 10
          url: {:action => 'changes', :id => @project, :repository_id => @repository.identifier_param, :path => to_path_param(@path), :rev => @rev }
11
        }
11
        } if @repository.supports_all_revisions?
12 12
tabs << { name: 'annotate', label: :button_annotate,
13 13
          url: {:action => 'annotate', :id => @project, :repository_id => @repository.identifier_param, :path => to_path_param(@path), :rev => @rev }
14 14
        } if @repository.supports_annotate?
test/functional/repositories_filesystem_controller_test.rb
202 202
      @project.reload
203 203
      assert_nil @project.repository
204 204
    end
205

  
206
    def test_show_should_only_show_view_tab
207
      get(
208
        :entry,
209
        :params => {
210
          :id => PRJ_ID,
211
          :repository_id => @repository.id,
212
          :path => repository_path_hash(['test'])[:param]
213
        }
214
      )
215
      assert_response :success
216
      assert @repository.supports_cat?
217
      assert_select 'a#tab-entry', :text => /View/
218
      assert_not @repository.supports_all_revisions?
219
      assert_select 'a#tab-changes', 0
220
      assert_not @repository.supports_annotate?
221
      assert_select 'a#tab-annotate', 0
222
    end
205 223
  else
206 224
    puts "Filesystem test repository NOT FOUND. Skipping functional tests !!!"
207 225
    def test_fake; assert true end
(2-2/2)