diff options
author | blackst0ne <blackst0ne.ru@gmail.com> | 2017-12-22 11:18:28 +0300 |
---|---|---|
committer | blackst0ne <blackst0ne.ru@gmail.com> | 2017-12-22 11:18:28 +0300 |
commit | 27c95364b52f4e93054c45211010aeb22e40a2b2 (patch) | |
tree | b817a1aa7bc4416bfc4cc2e51b2856d36479faf8 /spec/features/projects/members | |
parent | 36f4710301926bb853b35d9b14a60e03b42def34 (diff) |
Replace '.team << [user, role]' with 'add_role(user)' in specs
Diffstat (limited to 'spec/features/projects/members')
7 files changed, 7 insertions, 7 deletions
diff --git a/spec/features/projects/members/anonymous_user_sees_members_spec.rb b/spec/features/projects/members/anonymous_user_sees_members_spec.rb index bf0990d675d..e2a48bfd1d4 100644 --- a/spec/features/projects/members/anonymous_user_sees_members_spec.rb +++ b/spec/features/projects/members/anonymous_user_sees_members_spec.rb @@ -6,7 +6,7 @@ feature 'Projects > Members > Anonymous user sees members' do let(:project) { create(:project, :public) } background do - project.team << [user, :master] + project.add_master(user) create(:project_group_link, project: project, group: group) end diff --git a/spec/features/projects/members/group_members_spec.rb b/spec/features/projects/members/group_members_spec.rb index c140fece41d..e22b6fa6c43 100644 --- a/spec/features/projects/members/group_members_spec.rb +++ b/spec/features/projects/members/group_members_spec.rb @@ -11,7 +11,7 @@ feature 'Projects members' do let(:group_requester) { create(:user) } background do - project.team << [developer, :developer] + project.add_developer(developer) group.add_owner(user) sign_in(user) end diff --git a/spec/features/projects/members/groups_with_access_list_spec.rb b/spec/features/projects/members/groups_with_access_list_spec.rb index 7f067aadec6..e6d0c6e00f8 100644 --- a/spec/features/projects/members/groups_with_access_list_spec.rb +++ b/spec/features/projects/members/groups_with_access_list_spec.rb @@ -6,7 +6,7 @@ feature 'Projects > Members > Groups with access list', :js do let(:project) { create(:project, :public) } background do - project.team << [user, :master] + project.add_master(user) @group_link = create(:project_group_link, project: project, group: group) sign_in(user) diff --git a/spec/features/projects/members/master_adds_member_with_expiration_date_spec.rb b/spec/features/projects/members/master_adds_member_with_expiration_date_spec.rb index 0f88f4cb1e8..8fe340d3bae 100644 --- a/spec/features/projects/members/master_adds_member_with_expiration_date_spec.rb +++ b/spec/features/projects/members/master_adds_member_with_expiration_date_spec.rb @@ -9,7 +9,7 @@ feature 'Projects > Members > Master adds member with expiration date', :js do let!(:new_member) { create(:user) } background do - project.team << [master, :master] + project.add_master(master) sign_in(master) end diff --git a/spec/features/projects/members/master_manages_access_requests_spec.rb b/spec/features/projects/members/master_manages_access_requests_spec.rb index eb3c8034873..d575596937d 100644 --- a/spec/features/projects/members/master_manages_access_requests_spec.rb +++ b/spec/features/projects/members/master_manages_access_requests_spec.rb @@ -7,7 +7,7 @@ feature 'Projects > Members > Master manages access requests' do background do project.request_access(user) - project.team << [master, :master] + project.add_master(master) sign_in(master) end diff --git a/spec/features/projects/members/member_cannot_request_access_to_his_project_spec.rb b/spec/features/projects/members/member_cannot_request_access_to_his_project_spec.rb index 04806f8fd9e..47911c32a72 100644 --- a/spec/features/projects/members/member_cannot_request_access_to_his_project_spec.rb +++ b/spec/features/projects/members/member_cannot_request_access_to_his_project_spec.rb @@ -5,7 +5,7 @@ feature 'Projects > Members > Member cannot request access to his project' do let(:project) { create(:project) } background do - project.team << [member, :developer] + project.add_developer(member) sign_in(member) visit project_path(project) end diff --git a/spec/features/projects/members/member_leaves_project_spec.rb b/spec/features/projects/members/member_leaves_project_spec.rb index 1bcf827d33c..e54c2c76975 100644 --- a/spec/features/projects/members/member_leaves_project_spec.rb +++ b/spec/features/projects/members/member_leaves_project_spec.rb @@ -5,7 +5,7 @@ feature 'Projects > Members > Member leaves project' do let(:project) { create(:project, :repository) } background do - project.team << [user, :developer] + project.add_developer(user) sign_in(user) visit project_path(project) end |