]> source.dussan.org Git - redmine.git/commitdiff
shorten long line of test/integration/repositories_git_test.rb
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Wed, 18 Nov 2020 16:15:27 +0000 (16:15 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Wed, 18 Nov 2020 16:15:27 +0000 (16:15 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@20417 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/integration/repositories_git_test.rb

index 5c54d1e2f3352ec626264bedcad8dabe3b5b69ec..8c13b63c8d0248971d725e85ab7845eb21ef5be3 100644 (file)
@@ -82,14 +82,18 @@ class RepositoriesGitTest < Redmine::IntegrationTest
       @repository.fetch_changesets
       assert_equal NUM_REV, @repository.changesets.count
 
-      get "/projects/subproject1/repository/#{@repository.id}/revisions/deff712f05a90d96edbd70facc47d944be5897e3/diff/sources/watchers_controller.rb", :params => { :format => 'txt' }
+      id = "deff712f05a90d96edbd70facc47d944be5897e3"
+      get(
+        "/projects/subproject1/repository/#{@repository.id}/revisions/#{id}/diff/sources/watchers_controller.rb",
+        :params => {:format => 'txt'}
+      )
       assert_response :success
 
       assert a = css_select("a.diff").first
       assert_equal 'Unified diff', a.text
       get a['href']
       assert_response :success
-      assert_match /\Acommit deff712f05a90d96edbd70facc47d944be5897e3/, response.body
+      assert_match /\Acommit #{id}/, response.body
     end
 
     def test_entry_txt_should_return_html