# HG changeset patch # User Toshi MARUYAMA # Parent 51ddf6d6e0ca2feba8893be49579b814549cb31e https://www.redmine.org/issues/31141 diff --git a/test/integration/repositories_git_test.rb b/test/integration/repositories_git_test.rb --- a/test/integration/repositories_git_test.rb +++ b/test/integration/repositories_git_test.rb @@ -92,6 +92,17 @@ class RepositoriesGitTest < Redmine::Int assert_match /\Acommit deff712f05a90d96edbd70facc47d944be5897e3/, response.body end + def test_entry_txt_should_return_html + @repository.fetch_changesets + assert_equal NUM_REV, @repository.changesets.count + + get "/projects/subproject1/repository/#{@repository.id}/revisions/deff712f05a90d96edbd70facc47d944be5897e3/entry/new_file.txt" + assert_response :success + + assert l1 = css_select("#L1").first + assert l1_code = css_select(l1, "td.line-code").first + assert_match 'This is a brand new file', l1_code.text + end else puts "Git test repository NOT FOUND. Skipping integration tests !!!" def test_fake; assert true end diff --git a/test/integration/routing/repositories_test.rb b/test/integration/routing/repositories_test.rb --- a/test/integration/routing/repositories_test.rb +++ b/test/integration/routing/repositories_test.rb @@ -22,7 +22,9 @@ require File.expand_path('../../../test_ class RoutingRepositoriesTest < Redmine::RoutingTest def setup - @paths = ['path/to/file.c', 'path/to/index.html', 'raw/file.c'] + @paths = ['path/to/index.html', + 'path/to/file.c', 'path/to/file.yaml', 'path/to/file.txt', + 'raw/file.c'] end def test_repositories_resources