1 require 'integration_helper'
2 require 'helpers/share_object_helper'
4 class RepositoriesTest < ActionDispatch::IntegrationTest
5 include ShareObjectHelper
15 test "#{user} can manage sharing for another user" do
16 add_user = api_fixture('users')['future_project_user']
17 new_name = ["first_name", "last_name"].map { |k| add_user[k] }.join(" ")
18 show_object_using(user, 'repositories', 'foo', 'push_url')
20 add_share_and_check("users", new_name, add_user)
21 modify_share_and_check(new_name)
29 test "#{user} can manage sharing for another group" do
30 new_name = api_fixture('groups')['future_project_viewing_group']['name']
31 show_object_using(user, 'repositories', 'foo', 'push_url')
33 add_share_and_check("groups", new_name)
34 modify_share_and_check(new_name)
38 test "spectator does not see repository sharing tab" do
39 show_object_using("spectator", 'repositories', 'arvados', 'push_url')
40 assert(page.has_no_link?("Sharing"),
41 "read-only repository user sees sharing tab")