Merge branch '18947-githttpd'
[arvados.git] / apps / workbench / test / integration / repositories_browse_test.rb
1 # Copyright (C) The Arvados Authors. All rights reserved.
2 #
3 # SPDX-License-Identifier: AGPL-3.0
4
5 require 'integration_helper'
6 require 'helpers/repository_stub_helper'
7 require 'helpers/share_object_helper'
8
9 class RepositoriesTest < ActionDispatch::IntegrationTest
10   include RepositoryStubHelper
11   include ShareObjectHelper
12
13   reset_api_fixtures :after_each_test, false
14
15   setup do
16     need_javascript
17   end
18
19   test "browse using arv-git-http" do
20     repo = api_fixture('repositories')['foo']
21     commit_sha1 = '1de84a854e2b440dc53bf42f8548afa4c17da332'
22     visit page_with_token('active', "/repositories/#{repo['uuid']}/commit/#{commit_sha1}")
23     assert_text "Date:   Tue Mar 18 15:55:28 2014 -0400"
24     visit page_with_token('active', "/repositories/#{repo['uuid']}/tree/#{commit_sha1}")
25     assert_selector "tbody td a", "foo"
26     assert_text "12 bytes"
27   end
28 end