summaryrefslogtreecommitdiff
path: root/spec/services/projects
diff options
context:
space:
mode:
Diffstat (limited to 'spec/services/projects')
-rw-r--r--spec/services/projects/create_service_spec.rb4
-rw-r--r--spec/services/projects/move_access_service_spec.rb12
-rw-r--r--spec/services/projects/move_project_authorizations_service_spec.rb8
-rw-r--r--spec/services/projects/move_project_group_links_service_spec.rb8
-rw-r--r--spec/services/projects/move_project_members_service_spec.rb8
-rw-r--r--spec/services/projects/overwrite_project_service_spec.rb8
-rw-r--r--spec/services/projects/transfer_service_spec.rb2
7 files changed, 25 insertions, 25 deletions
diff --git a/spec/services/projects/create_service_spec.rb b/spec/services/projects/create_service_spec.rb
index 4e4329e898e..fd69fe04053 100644
--- a/spec/services/projects/create_service_spec.rb
+++ b/spec/services/projects/create_service_spec.rb
@@ -23,7 +23,7 @@ describe Projects::CreateService, '#execute' do
expect(project).to be_valid
expect(project.owner).to eq(user)
- expect(project.team.masters).to include(user)
+ expect(project.team.maintainers).to include(user)
expect(project.namespace).to eq(user.namespace)
end
end
@@ -47,7 +47,7 @@ describe Projects::CreateService, '#execute' do
expect(project).to be_persisted
expect(project.owner).to eq(user)
- expect(project.team.masters).to contain_exactly(user)
+ expect(project.team.maintainers).to contain_exactly(user)
expect(project.namespace).to eq(user.namespace)
end
end
diff --git a/spec/services/projects/move_access_service_spec.rb b/spec/services/projects/move_access_service_spec.rb
index a820ebd91f4..88d9d93c33b 100644
--- a/spec/services/projects/move_access_service_spec.rb
+++ b/spec/services/projects/move_access_service_spec.rb
@@ -4,18 +4,18 @@ describe Projects::MoveAccessService do
let(:user) { create(:user) }
let(:group) { create(:group) }
let(:project_with_access) { create(:project, namespace: user.namespace) }
- let(:master_user) { create(:user) }
+ let(:maintainer_user) { create(:user) }
let(:reporter_user) { create(:user) }
let(:developer_user) { create(:user) }
- let(:master_group) { create(:group) }
+ let(:maintainer_group) { create(:group) }
let(:reporter_group) { create(:group) }
let(:developer_group) { create(:group) }
before do
- project_with_access.add_master(master_user)
+ project_with_access.add_maintainer(maintainer_user)
project_with_access.add_developer(developer_user)
project_with_access.add_reporter(reporter_user)
- project_with_access.project_group_links.create(group: master_group, group_access: Gitlab::Access::MASTER)
+ project_with_access.project_group_links.create(group: maintainer_group, group_access: Gitlab::Access::MAINTAINER)
project_with_access.project_group_links.create(group: developer_group, group_access: Gitlab::Access::DEVELOPER)
project_with_access.project_group_links.create(group: reporter_group, group_access: Gitlab::Access::REPORTER)
end
@@ -87,7 +87,7 @@ describe Projects::MoveAccessService do
let(:options) { { remove_remaining_elements: false } }
it 'does not remove remaining memberships' do
- target_project.add_master(master_user)
+ target_project.add_maintainer(maintainer_user)
subject.execute(project_with_access, options)
@@ -95,7 +95,7 @@ describe Projects::MoveAccessService do
end
it 'does not remove remaining group links' do
- target_project.project_group_links.create(group: master_group, group_access: Gitlab::Access::MASTER)
+ target_project.project_group_links.create(group: maintainer_group, group_access: Gitlab::Access::MAINTAINER)
subject.execute(project_with_access, options)
diff --git a/spec/services/projects/move_project_authorizations_service_spec.rb b/spec/services/projects/move_project_authorizations_service_spec.rb
index f7262b9b887..b4408393624 100644
--- a/spec/services/projects/move_project_authorizations_service_spec.rb
+++ b/spec/services/projects/move_project_authorizations_service_spec.rb
@@ -4,7 +4,7 @@ describe Projects::MoveProjectAuthorizationsService do
let!(:user) { create(:user) }
let(:project_with_users) { create(:project, namespace: user.namespace) }
let(:target_project) { create(:project, namespace: user.namespace) }
- let(:master_user) { create(:user) }
+ let(:maintainer_user) { create(:user) }
let(:reporter_user) { create(:user) }
let(:developer_user) { create(:user) }
@@ -12,7 +12,7 @@ describe Projects::MoveProjectAuthorizationsService do
describe '#execute' do
before do
- project_with_users.add_master(master_user)
+ project_with_users.add_maintainer(maintainer_user)
project_with_users.add_developer(developer_user)
project_with_users.add_reporter(reporter_user)
end
@@ -28,7 +28,7 @@ describe Projects::MoveProjectAuthorizationsService do
end
it 'does not move existent authorizations to the current project' do
- target_project.add_master(developer_user)
+ target_project.add_maintainer(developer_user)
target_project.add_developer(reporter_user)
expect(project_with_users.authorized_users.count).to eq 4
@@ -44,7 +44,7 @@ describe Projects::MoveProjectAuthorizationsService do
let(:options) { { remove_remaining_elements: false } }
it 'does not remove remaining project authorizations' do
- target_project.add_master(developer_user)
+ target_project.add_maintainer(developer_user)
target_project.add_developer(reporter_user)
subject.execute(project_with_users, options)
diff --git a/spec/services/projects/move_project_group_links_service_spec.rb b/spec/services/projects/move_project_group_links_service_spec.rb
index e3d06e6d3d7..7ca8cf304fe 100644
--- a/spec/services/projects/move_project_group_links_service_spec.rb
+++ b/spec/services/projects/move_project_group_links_service_spec.rb
@@ -4,7 +4,7 @@ describe Projects::MoveProjectGroupLinksService do
let!(:user) { create(:user) }
let(:project_with_groups) { create(:project, namespace: user.namespace) }
let(:target_project) { create(:project, namespace: user.namespace) }
- let(:master_group) { create(:group) }
+ let(:maintainer_group) { create(:group) }
let(:reporter_group) { create(:group) }
let(:developer_group) { create(:group) }
@@ -12,7 +12,7 @@ describe Projects::MoveProjectGroupLinksService do
describe '#execute' do
before do
- project_with_groups.project_group_links.create(group: master_group, group_access: Gitlab::Access::MASTER)
+ project_with_groups.project_group_links.create(group: maintainer_group, group_access: Gitlab::Access::MAINTAINER)
project_with_groups.project_group_links.create(group: developer_group, group_access: Gitlab::Access::DEVELOPER)
project_with_groups.project_group_links.create(group: reporter_group, group_access: Gitlab::Access::REPORTER)
end
@@ -28,7 +28,7 @@ describe Projects::MoveProjectGroupLinksService do
end
it 'does not move existent group links in the current project' do
- target_project.project_group_links.create(group: master_group, group_access: Gitlab::Access::MASTER)
+ target_project.project_group_links.create(group: maintainer_group, group_access: Gitlab::Access::MAINTAINER)
target_project.project_group_links.create(group: developer_group, group_access: Gitlab::Access::DEVELOPER)
expect(project_with_groups.project_group_links.count).to eq 3
@@ -53,7 +53,7 @@ describe Projects::MoveProjectGroupLinksService do
let(:options) { { remove_remaining_elements: false } }
it 'does not remove remaining project group links' do
- target_project.project_group_links.create(group: master_group, group_access: Gitlab::Access::MASTER)
+ target_project.project_group_links.create(group: maintainer_group, group_access: Gitlab::Access::MAINTAINER)
target_project.project_group_links.create(group: developer_group, group_access: Gitlab::Access::DEVELOPER)
subject.execute(project_with_groups, options)
diff --git a/spec/services/projects/move_project_members_service_spec.rb b/spec/services/projects/move_project_members_service_spec.rb
index 9c9a2d2fde1..c8c0eac1f13 100644
--- a/spec/services/projects/move_project_members_service_spec.rb
+++ b/spec/services/projects/move_project_members_service_spec.rb
@@ -4,7 +4,7 @@ describe Projects::MoveProjectMembersService do
let!(:user) { create(:user) }
let(:project_with_users) { create(:project, namespace: user.namespace) }
let(:target_project) { create(:project, namespace: user.namespace) }
- let(:master_user) { create(:user) }
+ let(:maintainer_user) { create(:user) }
let(:reporter_user) { create(:user) }
let(:developer_user) { create(:user) }
@@ -12,7 +12,7 @@ describe Projects::MoveProjectMembersService do
describe '#execute' do
before do
- project_with_users.add_master(master_user)
+ project_with_users.add_maintainer(maintainer_user)
project_with_users.add_developer(developer_user)
project_with_users.add_reporter(reporter_user)
end
@@ -28,7 +28,7 @@ describe Projects::MoveProjectMembersService do
end
it 'does not move existent members to the current project' do
- target_project.add_master(developer_user)
+ target_project.add_maintainer(developer_user)
target_project.add_developer(reporter_user)
expect(project_with_users.project_members.count).to eq 4
@@ -53,7 +53,7 @@ describe Projects::MoveProjectMembersService do
let(:options) { { remove_remaining_elements: false } }
it 'does not remove remaining project members' do
- target_project.add_master(developer_user)
+ target_project.add_maintainer(developer_user)
target_project.add_developer(reporter_user)
subject.execute(project_with_users, options)
diff --git a/spec/services/projects/overwrite_project_service_spec.rb b/spec/services/projects/overwrite_project_service_spec.rb
index 252c61f4224..c7900629f5f 100644
--- a/spec/services/projects/overwrite_project_service_spec.rb
+++ b/spec/services/projects/overwrite_project_service_spec.rb
@@ -96,10 +96,10 @@ describe Projects::OverwriteProjectService do
context 'when project with elements' do
it_behaves_like 'overwrite actions' do
- let(:master_user) { create(:user) }
+ let(:maintainer_user) { create(:user) }
let(:reporter_user) { create(:user) }
let(:developer_user) { create(:user) }
- let(:master_group) { create(:group) }
+ let(:maintainer_group) { create(:group) }
let(:reporter_group) { create(:group) }
let(:developer_group) { create(:group) }
@@ -107,10 +107,10 @@ describe Projects::OverwriteProjectService do
create_list(:deploy_keys_project, 2, project: project_from)
create_list(:notification_setting, 2, source: project_from)
create_list(:users_star_project, 2, project: project_from)
- project_from.project_group_links.create(group: master_group, group_access: Gitlab::Access::MASTER)
+ project_from.project_group_links.create(group: maintainer_group, group_access: Gitlab::Access::MAINTAINER)
project_from.project_group_links.create(group: developer_group, group_access: Gitlab::Access::DEVELOPER)
project_from.project_group_links.create(group: reporter_group, group_access: Gitlab::Access::REPORTER)
- project_from.add_master(master_user)
+ project_from.add_maintainer(maintainer_user)
project_from.add_developer(developer_user)
project_from.add_reporter(reporter_user)
end
diff --git a/spec/services/projects/transfer_service_spec.rb b/spec/services/projects/transfer_service_spec.rb
index 5100987c2fe..7e85f599afb 100644
--- a/spec/services/projects/transfer_service_spec.rb
+++ b/spec/services/projects/transfer_service_spec.rb
@@ -247,7 +247,7 @@ describe Projects::TransferService do
let(:group_member) { create(:user) }
before do
- group.add_user(owner, GroupMember::MASTER)
+ group.add_user(owner, GroupMember::MAINTAINER)
group.add_user(group_member, GroupMember::DEVELOPER)
end