diff options
author | Mark Chao <mchao@gitlab.com> | 2018-07-11 17:36:08 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2018-07-11 17:36:08 +0300 |
commit | a63bce1a4b55bc6cbafb9dec12d33028521489e9 (patch) | |
tree | ee9466e6b06536a65d4e851f4096679c6f968d1e /spec/services/members | |
parent | 1bf54e092783f7ad388225d32ab79ac1e845559c (diff) |
Resolve "Rename the `Master` role to `Maintainer`" Backend
Diffstat (limited to 'spec/services/members')
4 files changed, 10 insertions, 10 deletions
diff --git a/spec/services/members/approve_access_request_service_spec.rb b/spec/services/members/approve_access_request_service_spec.rb index 7076571b753..5c30f5b6a61 100644 --- a/spec/services/members/approve_access_request_service_spec.rb +++ b/spec/services/members/approve_access_request_service_spec.rb @@ -34,9 +34,9 @@ describe Members::ApproveAccessRequestService do context 'with a custom access level' do it 'returns a ProjectMember with the custom access level' do - member = described_class.new(current_user, access_level: Gitlab::Access::MASTER).execute(access_requester, opts) + member = described_class.new(current_user, access_level: Gitlab::Access::MAINTAINER).execute(access_requester, opts) - expect(member.access_level).to eq(Gitlab::Access::MASTER) + expect(member.access_level).to eq(Gitlab::Access::MAINTAINER) end end end @@ -97,7 +97,7 @@ describe Members::ApproveAccessRequestService do context 'when current user can approve access request to the project' do before do - project.add_master(current_user) + project.add_maintainer(current_user) group.add_owner(current_user) end diff --git a/spec/services/members/create_service_spec.rb b/spec/services/members/create_service_spec.rb index 1831c62d788..5c01463d757 100644 --- a/spec/services/members/create_service_spec.rb +++ b/spec/services/members/create_service_spec.rb @@ -6,7 +6,7 @@ describe Members::CreateService do let(:project_user) { create(:user) } before do - project.add_master(user) + project.add_maintainer(user) end it 'adds user to members' do diff --git a/spec/services/members/destroy_service_spec.rb b/spec/services/members/destroy_service_spec.rb index b4e9f6af43a..ef47b0a450b 100644 --- a/spec/services/members/destroy_service_spec.rb +++ b/spec/services/members/destroy_service_spec.rb @@ -114,7 +114,7 @@ describe Members::DestroyService do context 'when current user can destroy the given member' do before do - group_project.add_master(current_user) + group_project.add_maintainer(current_user) group.add_owner(current_user) end @@ -170,7 +170,7 @@ describe Members::DestroyService do context 'when current user can destroy the given access requester' do before do - group_project.add_master(current_user) + group_project.add_maintainer(current_user) group.add_owner(current_user) end @@ -210,7 +210,7 @@ describe Members::DestroyService do context 'when current user can destroy the given invited user' do before do - group_project.add_master(current_user) + group_project.add_maintainer(current_user) group.add_owner(current_user) end diff --git a/spec/services/members/update_service_spec.rb b/spec/services/members/update_service_spec.rb index a451272dd1f..6d19a95ffeb 100644 --- a/spec/services/members/update_service_spec.rb +++ b/spec/services/members/update_service_spec.rb @@ -8,7 +8,7 @@ describe Members::UpdateService do let(:permission) { :update } let(:member) { source.members_and_requesters.find_by!(user_id: member_user.id) } let(:params) do - { access_level: Gitlab::Access::MASTER } + { access_level: Gitlab::Access::MAINTAINER } end shared_examples 'a service raising Gitlab::Access::AccessDeniedError' do @@ -23,7 +23,7 @@ describe Members::UpdateService do updated_member = described_class.new(current_user, params).execute(member, permission: permission) expect(updated_member).to be_valid - expect(updated_member.access_level).to eq(Gitlab::Access::MASTER) + expect(updated_member.access_level).to eq(Gitlab::Access::MAINTAINER) end end @@ -44,7 +44,7 @@ describe Members::UpdateService do context 'when current user can update the given member' do before do - project.add_master(current_user) + project.add_maintainer(current_user) group.add_owner(current_user) end |