summaryrefslogtreecommitdiff
path: root/spec/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'spec/controllers')
-rw-r--r--spec/controllers/autocomplete_controller_spec.rb20
-rw-r--r--spec/controllers/boards/issues_controller_spec.rb2
-rw-r--r--spec/controllers/boards/lists_controller_spec.rb2
-rw-r--r--spec/controllers/dashboard/groups_controller_spec.rb4
-rw-r--r--spec/controllers/dashboard/milestones_controller_spec.rb2
-rw-r--r--spec/controllers/dashboard_controller_spec.rb2
-rw-r--r--spec/controllers/groups/boards_controller_spec.rb2
-rw-r--r--spec/controllers/groups/milestones_controller_spec.rb2
-rw-r--r--spec/controllers/groups/runners_controller_spec.rb2
-rw-r--r--spec/controllers/groups/settings/ci_cd_controller_spec.rb2
-rw-r--r--spec/controllers/groups/variables_controller_spec.rb2
-rw-r--r--spec/controllers/groups_controller_spec.rb6
-rw-r--r--spec/controllers/projects/avatars_controller_spec.rb2
-rw-r--r--spec/controllers/projects/badges_controller_spec.rb2
-rw-r--r--spec/controllers/projects/blame_controller_spec.rb2
-rw-r--r--spec/controllers/projects/blob_controller_spec.rb12
-rw-r--r--spec/controllers/projects/boards_controller_spec.rb2
-rw-r--r--spec/controllers/projects/branches_controller_spec.rb2
-rw-r--r--spec/controllers/projects/clusters/applications_controller_spec.rb4
-rw-r--r--spec/controllers/projects/clusters_controller_spec.rb36
-rw-r--r--spec/controllers/projects/commit_controller_spec.rb2
-rw-r--r--spec/controllers/projects/commits_controller_spec.rb2
-rw-r--r--spec/controllers/projects/compare_controller_spec.rb2
-rw-r--r--spec/controllers/projects/cycle_analytics_controller_spec.rb2
-rw-r--r--spec/controllers/projects/deploy_keys_controller_spec.rb2
-rw-r--r--spec/controllers/projects/deployments_controller_spec.rb2
-rw-r--r--spec/controllers/projects/environments_controller_spec.rb2
-rw-r--r--spec/controllers/projects/find_file_controller_spec.rb2
-rw-r--r--spec/controllers/projects/graphs_controller_spec.rb2
-rw-r--r--spec/controllers/projects/group_links_controller_spec.rb2
-rw-r--r--spec/controllers/projects/hooks_controller_spec.rb2
-rw-r--r--spec/controllers/projects/imports_controller_spec.rb2
-rw-r--r--spec/controllers/projects/issues_controller_spec.rb4
-rw-r--r--spec/controllers/projects/jobs_controller_spec.rb2
-rw-r--r--spec/controllers/projects/labels_controller_spec.rb2
-rw-r--r--spec/controllers/projects/mattermosts_controller_spec.rb2
-rw-r--r--spec/controllers/projects/merge_requests/creations_controller_spec.rb4
-rw-r--r--spec/controllers/projects/merge_requests/diffs_controller_spec.rb2
-rw-r--r--spec/controllers/projects/milestones_controller_spec.rb2
-rw-r--r--spec/controllers/projects/pages_controller_spec.rb2
-rw-r--r--spec/controllers/projects/pages_domains_controller_spec.rb2
-rw-r--r--spec/controllers/projects/pipeline_schedules_controller_spec.rb28
-rw-r--r--spec/controllers/projects/pipelines_settings_controller_spec.rb2
-rw-r--r--spec/controllers/projects/project_members_controller_spec.rb20
-rw-r--r--spec/controllers/projects/prometheus/metrics_controller_spec.rb2
-rw-r--r--spec/controllers/projects/protected_branches_controller_spec.rb8
-rw-r--r--spec/controllers/projects/protected_tags_controller_spec.rb2
-rw-r--r--spec/controllers/projects/runners_controller_spec.rb2
-rw-r--r--spec/controllers/projects/services_controller_spec.rb2
-rw-r--r--spec/controllers/projects/settings/ci_cd_controller_spec.rb6
-rw-r--r--spec/controllers/projects/settings/integrations_controller_spec.rb2
-rw-r--r--spec/controllers/projects/settings/repository_controller_spec.rb2
-rw-r--r--spec/controllers/projects/snippets_controller_spec.rb6
-rw-r--r--spec/controllers/projects/templates_controller_spec.rb2
-rw-r--r--spec/controllers/projects/tree_controller_spec.rb2
-rw-r--r--spec/controllers/projects/variables_controller_spec.rb2
-rw-r--r--spec/controllers/projects_controller_spec.rb8
-rw-r--r--spec/controllers/uploads_controller_spec.rb8
58 files changed, 130 insertions, 130 deletions
diff --git a/spec/controllers/autocomplete_controller_spec.rb b/spec/controllers/autocomplete_controller_spec.rb
index fb6d82d7de3..2c59d1929a1 100644
--- a/spec/controllers/autocomplete_controller_spec.rb
+++ b/spec/controllers/autocomplete_controller_spec.rb
@@ -228,12 +228,12 @@ describe AutocompleteController do
before do
sign_in(user)
- project.add_master(user)
+ project.add_maintainer(user)
end
context 'authorized projects' do
before do
- authorized_project.add_master(user)
+ authorized_project.add_maintainer(user)
end
describe 'GET #projects with project ID' do
@@ -253,8 +253,8 @@ describe AutocompleteController do
context 'authorized projects and search' do
before do
- authorized_project.add_master(user)
- authorized_search_project.add_master(user)
+ authorized_project.add_maintainer(user)
+ authorized_search_project.add_maintainer(user)
end
describe 'GET #projects with project ID and search' do
@@ -277,9 +277,9 @@ describe AutocompleteController do
authorized_project2 = create(:project)
authorized_project3 = create(:project)
- authorized_project.add_master(user)
- authorized_project2.add_master(user)
- authorized_project3.add_master(user)
+ authorized_project.add_maintainer(user)
+ authorized_project2.add_maintainer(user)
+ authorized_project3.add_maintainer(user)
stub_const 'MoveToProjectFinder::PAGE_SIZE', 2
end
@@ -301,9 +301,9 @@ describe AutocompleteController do
authorized_project2 = create(:project)
authorized_project3 = create(:project)
- authorized_project.add_master(user)
- authorized_project2.add_master(user)
- authorized_project3.add_master(user)
+ authorized_project.add_maintainer(user)
+ authorized_project2.add_maintainer(user)
+ authorized_project3.add_maintainer(user)
end
describe 'GET #projects with project ID and offset_id' do
diff --git a/spec/controllers/boards/issues_controller_spec.rb b/spec/controllers/boards/issues_controller_spec.rb
index e47ff8661a2..ce7762691c9 100644
--- a/spec/controllers/boards/issues_controller_spec.rb
+++ b/spec/controllers/boards/issues_controller_spec.rb
@@ -13,7 +13,7 @@ describe Boards::IssuesController do
let!(:list2) { create(:list, board: board, label: development, position: 1) }
before do
- project.add_master(user)
+ project.add_maintainer(user)
project.add_guest(guest)
end
diff --git a/spec/controllers/boards/lists_controller_spec.rb b/spec/controllers/boards/lists_controller_spec.rb
index 57ccbf1d6b5..80631d2efb0 100644
--- a/spec/controllers/boards/lists_controller_spec.rb
+++ b/spec/controllers/boards/lists_controller_spec.rb
@@ -7,7 +7,7 @@ describe Boards::ListsController do
let(:guest) { create(:user) }
before do
- project.add_master(user)
+ project.add_maintainer(user)
project.add_guest(guest)
end
diff --git a/spec/controllers/dashboard/groups_controller_spec.rb b/spec/controllers/dashboard/groups_controller_spec.rb
index 7f2eaf95165..9068c1a792e 100644
--- a/spec/controllers/dashboard/groups_controller_spec.rb
+++ b/spec/controllers/dashboard/groups_controller_spec.rb
@@ -28,8 +28,8 @@ describe Dashboard::GroupsController do
let!(:other_group) { create(:group, name: 'other') }
before do
- top_level_result.add_master(user)
- top_level_a.add_master(user)
+ top_level_result.add_maintainer(user)
+ top_level_a.add_maintainer(user)
end
it 'renders only groups the user is a member of when searching hierarchy correctly' do
diff --git a/spec/controllers/dashboard/milestones_controller_spec.rb b/spec/controllers/dashboard/milestones_controller_spec.rb
index 60547db82b6..ba2669a5ea7 100644
--- a/spec/controllers/dashboard/milestones_controller_spec.rb
+++ b/spec/controllers/dashboard/milestones_controller_spec.rb
@@ -17,7 +17,7 @@ describe Dashboard::MilestonesController do
before do
sign_in(user)
- project.add_master(user)
+ project.add_maintainer(user)
end
it_behaves_like 'milestone tabs'
diff --git a/spec/controllers/dashboard_controller_spec.rb b/spec/controllers/dashboard_controller_spec.rb
index 3458d679107..187542ba30c 100644
--- a/spec/controllers/dashboard_controller_spec.rb
+++ b/spec/controllers/dashboard_controller_spec.rb
@@ -5,7 +5,7 @@ describe DashboardController do
let(:project) { create(:project) }
before do
- project.add_master(user)
+ project.add_maintainer(user)
sign_in(user)
end
diff --git a/spec/controllers/groups/boards_controller_spec.rb b/spec/controllers/groups/boards_controller_spec.rb
index 0f5bde62006..bf41aa0706f 100644
--- a/spec/controllers/groups/boards_controller_spec.rb
+++ b/spec/controllers/groups/boards_controller_spec.rb
@@ -5,7 +5,7 @@ describe Groups::BoardsController do
let(:user) { create(:user) }
before do
- group.add_master(user)
+ group.add_maintainer(user)
sign_in(user)
end
diff --git a/spec/controllers/groups/milestones_controller_spec.rb b/spec/controllers/groups/milestones_controller_spec.rb
index 733386500ca..f7068546093 100644
--- a/spec/controllers/groups/milestones_controller_spec.rb
+++ b/spec/controllers/groups/milestones_controller_spec.rb
@@ -28,7 +28,7 @@ describe Groups::MilestonesController do
before do
sign_in(user)
group.add_owner(user)
- project.add_master(user)
+ project.add_maintainer(user)
end
describe '#index' do
diff --git a/spec/controllers/groups/runners_controller_spec.rb b/spec/controllers/groups/runners_controller_spec.rb
index 5770d15557c..598fb84552f 100644
--- a/spec/controllers/groups/runners_controller_spec.rb
+++ b/spec/controllers/groups/runners_controller_spec.rb
@@ -14,7 +14,7 @@ describe Groups::RunnersController do
before do
sign_in(user)
- group.add_master(user)
+ group.add_maintainer(user)
end
describe '#update' do
diff --git a/spec/controllers/groups/settings/ci_cd_controller_spec.rb b/spec/controllers/groups/settings/ci_cd_controller_spec.rb
index e9f0924caba..ea18122e0c3 100644
--- a/spec/controllers/groups/settings/ci_cd_controller_spec.rb
+++ b/spec/controllers/groups/settings/ci_cd_controller_spec.rb
@@ -5,7 +5,7 @@ describe Groups::Settings::CiCdController do
let(:user) { create(:user) }
before do
- group.add_master(user)
+ group.add_maintainer(user)
sign_in(user)
end
diff --git a/spec/controllers/groups/variables_controller_spec.rb b/spec/controllers/groups/variables_controller_spec.rb
index 39a36b92bb4..e5ac5634f95 100644
--- a/spec/controllers/groups/variables_controller_spec.rb
+++ b/spec/controllers/groups/variables_controller_spec.rb
@@ -6,7 +6,7 @@ describe Groups::VariablesController do
before do
sign_in(user)
- group.add_master(user)
+ group.add_maintainer(user)
end
describe 'GET #show' do
diff --git a/spec/controllers/groups_controller_spec.rb b/spec/controllers/groups_controller_spec.rb
index 8688fb33f0d..7a037828035 100644
--- a/spec/controllers/groups_controller_spec.rb
+++ b/spec/controllers/groups_controller_spec.rb
@@ -7,7 +7,7 @@ describe GroupsController do
let(:project) { create(:project, namespace: group) }
let!(:group_member) { create(:group_member, group: group, user: user) }
let!(:owner) { group.add_owner(create(:user)).user }
- let!(:master) { group.add_master(create(:user)).user }
+ let!(:maintainer) { group.add_maintainer(create(:user)).user }
let!(:developer) { group.add_developer(create(:user)).user }
let!(:guest) { group.add_guest(create(:user)).user }
@@ -62,7 +62,7 @@ describe GroupsController do
[true, false].each do |can_create_group_status|
context "and can_create_group is #{can_create_group_status}" do
before do
- User.where(id: [admin, owner, master, developer, guest]).update_all(can_create_group: can_create_group_status)
+ User.where(id: [admin, owner, maintainer, developer, guest]).update_all(can_create_group: can_create_group_status)
end
[:admin, :owner].each do |member_type|
@@ -73,7 +73,7 @@ describe GroupsController do
end
end
- [:guest, :developer, :master].each do |member_type|
+ [:guest, :developer, :maintainer].each do |member_type|
context "and logged in as #{member_type.capitalize}" do
it_behaves_like 'member without ability to create subgroups' do
let(:member) { send(member_type) }
diff --git a/spec/controllers/projects/avatars_controller_spec.rb b/spec/controllers/projects/avatars_controller_spec.rb
index acfa2730d94..17c9a61f339 100644
--- a/spec/controllers/projects/avatars_controller_spec.rb
+++ b/spec/controllers/projects/avatars_controller_spec.rb
@@ -6,7 +6,7 @@ describe Projects::AvatarsController do
before do
sign_in(user)
- project.add_master(user)
+ project.add_maintainer(user)
controller.instance_variable_set(:@project, project)
end
diff --git a/spec/controllers/projects/badges_controller_spec.rb b/spec/controllers/projects/badges_controller_spec.rb
index e7cddf8cfbf..dfe34171b55 100644
--- a/spec/controllers/projects/badges_controller_spec.rb
+++ b/spec/controllers/projects/badges_controller_spec.rb
@@ -6,7 +6,7 @@ describe Projects::BadgesController do
let(:user) { create(:user) }
before do
- project.add_master(user)
+ project.add_maintainer(user)
sign_in(user)
end
diff --git a/spec/controllers/projects/blame_controller_spec.rb b/spec/controllers/projects/blame_controller_spec.rb
index 88d4f4e9cd0..fe4c4863717 100644
--- a/spec/controllers/projects/blame_controller_spec.rb
+++ b/spec/controllers/projects/blame_controller_spec.rb
@@ -7,7 +7,7 @@ describe Projects::BlameController do
before do
sign_in(user)
- project.add_master(user)
+ project.add_maintainer(user)
controller.instance_variable_set(:@project, project)
end
diff --git a/spec/controllers/projects/blob_controller_spec.rb b/spec/controllers/projects/blob_controller_spec.rb
index 4dcb7dc6c87..32cd7c6e70a 100644
--- a/spec/controllers/projects/blob_controller_spec.rb
+++ b/spec/controllers/projects/blob_controller_spec.rb
@@ -108,7 +108,7 @@ describe Projects::BlobController do
end
before do
- project.add_master(user)
+ project.add_maintainer(user)
sign_in(user)
end
@@ -230,12 +230,12 @@ describe Projects::BlobController do
end
end
- context 'as master' do
- let(:master) { create(:user) }
+ context 'as maintainer' do
+ let(:maintainer) { create(:user) }
before do
- project.add_master(master)
- sign_in(master)
+ project.add_maintainer(maintainer)
+ sign_in(maintainer)
get :edit, default_params
end
@@ -263,7 +263,7 @@ describe Projects::BlobController do
end
before do
- project.add_master(user)
+ project.add_maintainer(user)
sign_in(user)
end
diff --git a/spec/controllers/projects/boards_controller_spec.rb b/spec/controllers/projects/boards_controller_spec.rb
index 509f19ed030..096efc1c7b2 100644
--- a/spec/controllers/projects/boards_controller_spec.rb
+++ b/spec/controllers/projects/boards_controller_spec.rb
@@ -5,7 +5,7 @@ describe Projects::BoardsController do
let(:user) { create(:user) }
before do
- project.add_master(user)
+ project.add_maintainer(user)
sign_in(user)
end
diff --git a/spec/controllers/projects/branches_controller_spec.rb b/spec/controllers/projects/branches_controller_spec.rb
index 4860ea5dcce..31471cde420 100644
--- a/spec/controllers/projects/branches_controller_spec.rb
+++ b/spec/controllers/projects/branches_controller_spec.rb
@@ -6,7 +6,7 @@ describe Projects::BranchesController do
let(:developer) { create(:user) }
before do
- project.add_master(user)
+ project.add_maintainer(user)
project.add_developer(user)
allow(project).to receive(:branches).and_return(['master', 'foo/bar/baz'])
diff --git a/spec/controllers/projects/clusters/applications_controller_spec.rb b/spec/controllers/projects/clusters/applications_controller_spec.rb
index 99fdff5f846..9e17e392d3d 100644
--- a/spec/controllers/projects/clusters/applications_controller_spec.rb
+++ b/spec/controllers/projects/clusters/applications_controller_spec.rb
@@ -17,7 +17,7 @@ describe Projects::Clusters::ApplicationsController do
let(:user) { create(:user) }
before do
- project.add_master(user)
+ project.add_maintainer(user)
sign_in(user)
end
@@ -70,7 +70,7 @@ describe Projects::Clusters::ApplicationsController do
it { expect { go }.to be_allowed_for(:admin) }
it { expect { go }.to be_allowed_for(:owner).of(project) }
- it { expect { go }.to be_allowed_for(:master).of(project) }
+ it { expect { go }.to be_allowed_for(:maintainer).of(project) }
it { expect { go }.to be_denied_for(:developer).of(project) }
it { expect { go }.to be_denied_for(:reporter).of(project) }
it { expect { go }.to be_denied_for(:guest).of(project) }
diff --git a/spec/controllers/projects/clusters_controller_spec.rb b/spec/controllers/projects/clusters_controller_spec.rb
index e47ccdc9aea..42917d0d505 100644
--- a/spec/controllers/projects/clusters_controller_spec.rb
+++ b/spec/controllers/projects/clusters_controller_spec.rb
@@ -11,7 +11,7 @@ describe Projects::ClustersController do
let(:user) { create(:user) }
before do
- project.add_master(user)
+ project.add_maintainer(user)
sign_in(user)
end
@@ -61,7 +61,7 @@ describe Projects::ClustersController do
it { expect { go }.to be_allowed_for(:admin) }
it { expect { go }.to be_allowed_for(:owner).of(project) }
- it { expect { go }.to be_allowed_for(:master).of(project) }
+ it { expect { go }.to be_allowed_for(:maintainer).of(project) }
it { expect { go }.to be_denied_for(:developer).of(project) }
it { expect { go }.to be_denied_for(:reporter).of(project) }
it { expect { go }.to be_denied_for(:guest).of(project) }
@@ -79,7 +79,7 @@ describe Projects::ClustersController do
let(:user) { create(:user) }
before do
- project.add_master(user)
+ project.add_maintainer(user)
sign_in(user)
end
@@ -142,7 +142,7 @@ describe Projects::ClustersController do
let(:user) { create(:user) }
before do
- project.add_master(user)
+ project.add_maintainer(user)
sign_in(user)
end
@@ -156,7 +156,7 @@ describe Projects::ClustersController do
describe 'security' do
it { expect { go }.to be_allowed_for(:admin) }
it { expect { go }.to be_allowed_for(:owner).of(project) }
- it { expect { go }.to be_allowed_for(:master).of(project) }
+ it { expect { go }.to be_allowed_for(:maintainer).of(project) }
it { expect { go }.to be_denied_for(:developer).of(project) }
it { expect { go }.to be_denied_for(:reporter).of(project) }
it { expect { go }.to be_denied_for(:guest).of(project) }
@@ -185,7 +185,7 @@ describe Projects::ClustersController do
let(:user) { create(:user) }
before do
- project.add_master(user)
+ project.add_maintainer(user)
sign_in(user)
end
@@ -236,7 +236,7 @@ describe Projects::ClustersController do
it { expect { go }.to be_allowed_for(:admin) }
it { expect { go }.to be_allowed_for(:owner).of(project) }
- it { expect { go }.to be_allowed_for(:master).of(project) }
+ it { expect { go }.to be_allowed_for(:maintainer).of(project) }
it { expect { go }.to be_denied_for(:developer).of(project) }
it { expect { go }.to be_denied_for(:reporter).of(project) }
it { expect { go }.to be_denied_for(:guest).of(project) }
@@ -267,7 +267,7 @@ describe Projects::ClustersController do
let(:user) { create(:user) }
before do
- project.add_master(user)
+ project.add_maintainer(user)
sign_in(user)
end
@@ -286,7 +286,7 @@ describe Projects::ClustersController do
describe 'security' do
it { expect { go }.to be_allowed_for(:admin) }
it { expect { go }.to be_allowed_for(:owner).of(project) }
- it { expect { go }.to be_allowed_for(:master).of(project) }
+ it { expect { go }.to be_allowed_for(:maintainer).of(project) }
it { expect { go }.to be_denied_for(:developer).of(project) }
it { expect { go }.to be_denied_for(:reporter).of(project) }
it { expect { go }.to be_denied_for(:guest).of(project) }
@@ -306,7 +306,7 @@ describe Projects::ClustersController do
let(:user) { create(:user) }
before do
- project.add_master(user)
+ project.add_maintainer(user)
sign_in(user)
end
@@ -327,7 +327,7 @@ describe Projects::ClustersController do
describe 'security' do
it { expect { go }.to be_allowed_for(:admin) }
it { expect { go }.to be_allowed_for(:owner).of(project) }
- it { expect { go }.to be_allowed_for(:master).of(project) }
+ it { expect { go }.to be_allowed_for(:maintainer).of(project) }
it { expect { go }.to be_denied_for(:developer).of(project) }
it { expect { go }.to be_denied_for(:reporter).of(project) }
it { expect { go }.to be_denied_for(:guest).of(project) }
@@ -350,7 +350,7 @@ describe Projects::ClustersController do
let(:user) { create(:user) }
before do
- project.add_master(user)
+ project.add_maintainer(user)
sign_in(user)
end
@@ -365,7 +365,7 @@ describe Projects::ClustersController do
describe 'security' do
it { expect { go }.to be_allowed_for(:admin) }
it { expect { go }.to be_allowed_for(:owner).of(project) }
- it { expect { go }.to be_allowed_for(:master).of(project) }
+ it { expect { go }.to be_allowed_for(:maintainer).of(project) }
it { expect { go }.to be_denied_for(:developer).of(project) }
it { expect { go }.to be_denied_for(:reporter).of(project) }
it { expect { go }.to be_denied_for(:guest).of(project) }
@@ -386,7 +386,7 @@ describe Projects::ClustersController do
let(:user) { create(:user) }
before do
- project.add_master(user)
+ project.add_maintainer(user)
sign_in(user)
end
@@ -437,7 +437,7 @@ describe Projects::ClustersController do
let(:user) { create(:user) }
before do
- project.add_master(user)
+ project.add_maintainer(user)
sign_in(user)
end
@@ -525,7 +525,7 @@ describe Projects::ClustersController do
it { expect { go }.to be_allowed_for(:admin) }
it { expect { go }.to be_allowed_for(:owner).of(project) }
- it { expect { go }.to be_allowed_for(:master).of(project) }
+ it { expect { go }.to be_allowed_for(:maintainer).of(project) }
it { expect { go }.to be_denied_for(:developer).of(project) }
it { expect { go }.to be_denied_for(:reporter).of(project) }
it { expect { go }.to be_denied_for(:guest).of(project) }
@@ -552,7 +552,7 @@ describe Projects::ClustersController do
let(:user) { create(:user) }
before do
- project.add_master(user)
+ project.add_maintainer(user)
sign_in(user)
end
@@ -605,7 +605,7 @@ describe Projects::ClustersController do
it { expect { go }.to be_allowed_for(:admin) }
it { expect { go }.to be_allowed_for(:owner).of(project) }
- it { expect { go }.to be_allowed_for(:master).of(project) }
+ it { expect { go }.to be_allowed_for(:maintainer).of(project) }
it { expect { go }.to be_denied_for(:developer).of(project) }
it { expect { go }.to be_denied_for(:reporter).of(project) }
it { expect { go }.to be_denied_for(:guest).of(project) }
diff --git a/spec/controllers/projects/commit_controller_spec.rb b/spec/controllers/projects/commit_controller_spec.rb
index 003fec8ac68..916a4be2567 100644
--- a/spec/controllers/projects/commit_controller_spec.rb
+++ b/spec/controllers/projects/commit_controller_spec.rb
@@ -9,7 +9,7 @@ describe Projects::CommitController do
before do
sign_in(user)
- project.add_master(user)
+ project.add_maintainer(user)
end
describe 'GET show' do
diff --git a/spec/controllers/projects/commits_controller_spec.rb b/spec/controllers/projects/commits_controller_spec.rb
index 55ed276f96b..d44048fdf55 100644
--- a/spec/controllers/projects/commits_controller_spec.rb
+++ b/spec/controllers/projects/commits_controller_spec.rb
@@ -6,7 +6,7 @@ describe Projects::CommitsController do
before do
sign_in(user)
- project.add_master(user)
+ project.add_maintainer(user)
end
describe "GET show" do
diff --git a/spec/controllers/projects/compare_controller_spec.rb b/spec/controllers/projects/compare_controller_spec.rb
index b15cde4314e..8695aa826bb 100644
--- a/spec/controllers/projects/compare_controller_spec.rb
+++ b/spec/controllers/projects/compare_controller_spec.rb
@@ -6,7 +6,7 @@ describe Projects::CompareController do
before do
sign_in(user)
- project.add_master(user)
+ project.add_maintainer(user)
end
describe 'GET index' do
diff --git a/spec/controllers/projects/cycle_analytics_controller_spec.rb b/spec/controllers/projects/cycle_analytics_controller_spec.rb
index 5516c95d044..5c79269e8f1 100644
--- a/spec/controllers/projects/cycle_analytics_controller_spec.rb
+++ b/spec/controllers/projects/cycle_analytics_controller_spec.rb
@@ -6,7 +6,7 @@ describe Projects::CycleAnalyticsController do
before do
sign_in(user)
- project.add_master(user)
+ project.add_maintainer(user)
end
describe 'cycle analytics not set up flag' do
diff --git a/spec/controllers/projects/deploy_keys_controller_spec.rb b/spec/controllers/projects/deploy_keys_controller_spec.rb
index 97db69427e9..d2f133f972a 100644
--- a/spec/controllers/projects/deploy_keys_controller_spec.rb
+++ b/spec/controllers/projects/deploy_keys_controller_spec.rb
@@ -5,7 +5,7 @@ describe Projects::DeployKeysController do
let(:user) { create(:user) }
before do
- project.add_master(user)
+ project.add_maintainer(user)
sign_in(user)
end
diff --git a/spec/controllers/projects/deployments_controller_spec.rb b/spec/controllers/projects/deployments_controller_spec.rb
index 6c67dfde63a..d1c960e895d 100644
--- a/spec/controllers/projects/deployments_controller_spec.rb
+++ b/spec/controllers/projects/deployments_controller_spec.rb
@@ -8,7 +8,7 @@ describe Projects::DeploymentsController do
let(:environment) { create(:environment, name: 'production', project: project) }
before do
- project.add_master(user)
+ project.add_maintainer(user)
sign_in(user)
end
diff --git a/spec/controllers/projects/environments_controller_spec.rb b/spec/controllers/projects/environments_controller_spec.rb
index 63cef579864..b86029a4baf 100644
--- a/spec/controllers/projects/environments_controller_spec.rb
+++ b/spec/controllers/projects/environments_controller_spec.rb
@@ -9,7 +9,7 @@ describe Projects::EnvironmentsController do
end
before do
- project.add_master(user)
+ project.add_maintainer(user)
sign_in(user)
end
diff --git a/spec/controllers/projects/find_file_controller_spec.rb b/spec/controllers/projects/find_file_controller_spec.rb
index 505fe82851a..66fe41108e2 100644
--- a/spec/controllers/projects/find_file_controller_spec.rb
+++ b/spec/controllers/projects/find_file_controller_spec.rb
@@ -7,7 +7,7 @@ describe Projects::FindFileController do
before do
sign_in(user)
- project.add_master(user)
+ project.add_maintainer(user)
controller.instance_variable_set(:@project, project)
end
diff --git a/spec/controllers/projects/graphs_controller_spec.rb b/spec/controllers/projects/graphs_controller_spec.rb
index c3605555fe7..da78592a6f6 100644
--- a/spec/controllers/projects/graphs_controller_spec.rb
+++ b/spec/controllers/projects/graphs_controller_spec.rb
@@ -6,7 +6,7 @@ describe Projects::GraphsController do
before do
sign_in(user)
- project.add_master(user)
+ project.add_maintainer(user)
end
describe 'GET languages' do
diff --git a/spec/controllers/projects/group_links_controller_spec.rb b/spec/controllers/projects/group_links_controller_spec.rb
index 78c6f7839b4..879aff26deb 100644
--- a/spec/controllers/projects/group_links_controller_spec.rb
+++ b/spec/controllers/projects/group_links_controller_spec.rb
@@ -7,7 +7,7 @@ describe Projects::GroupLinksController do
let(:user) { create(:user) }
before do
- project.add_master(user)
+ project.add_maintainer(user)
sign_in(user)
end
diff --git a/spec/controllers/projects/hooks_controller_spec.rb b/spec/controllers/projects/hooks_controller_spec.rb
index 2d473d5bf52..0f3033b0933 100644
--- a/spec/controllers/projects/hooks_controller_spec.rb
+++ b/spec/controllers/projects/hooks_controller_spec.rb
@@ -5,7 +5,7 @@ describe Projects::HooksController do
let(:user) { create(:user) }
before do
- project.add_master(user)
+ project.add_maintainer(user)
sign_in(user)
end
diff --git a/spec/controllers/projects/imports_controller_spec.rb b/spec/controllers/projects/imports_controller_spec.rb
index 6f06210f3de..adf3c78ae51 100644
--- a/spec/controllers/projects/imports_controller_spec.rb
+++ b/spec/controllers/projects/imports_controller_spec.rb
@@ -6,7 +6,7 @@ describe Projects::ImportsController do
before do
sign_in(user)
- project.add_master(user)
+ project.add_maintainer(user)
end
describe 'GET #show' do
diff --git a/spec/controllers/projects/issues_controller_spec.rb b/spec/controllers/projects/issues_controller_spec.rb
index 3a41f0fc07a..ff1835a34c2 100644
--- a/spec/controllers/projects/issues_controller_spec.rb
+++ b/spec/controllers/projects/issues_controller_spec.rb
@@ -695,7 +695,7 @@ describe Projects::IssuesController do
let(:project) { merge_request.source_project }
before do
- project.add_master(user)
+ project.add_maintainer(user)
sign_in user
end
@@ -869,7 +869,7 @@ describe Projects::IssuesController do
def post_spam
admin = create(:admin)
create(:user_agent_detail, subject: issue)
- project.add_master(admin)
+ project.add_maintainer(admin)
sign_in(admin)
post :mark_as_spam, {
namespace_id: project.namespace,
diff --git a/spec/controllers/projects/jobs_controller_spec.rb b/spec/controllers/projects/jobs_controller_spec.rb
index 6be27126383..1aca44c6e74 100644
--- a/spec/controllers/projects/jobs_controller_spec.rb
+++ b/spec/controllers/projects/jobs_controller_spec.rb
@@ -431,7 +431,7 @@ describe Projects::JobsController, :clean_gitlab_redis_shared_state do
end
describe 'POST erase' do
- let(:role) { :master }
+ let(:role) { :maintainer }
before do
project.add_role(user, role)
diff --git a/spec/controllers/projects/labels_controller_spec.rb b/spec/controllers/projects/labels_controller_spec.rb
index 452d7e23983..273702e6d21 100644
--- a/spec/controllers/projects/labels_controller_spec.rb
+++ b/spec/controllers/projects/labels_controller_spec.rb
@@ -6,7 +6,7 @@ describe Projects::LabelsController do
let(:user) { create(:user) }
before do
- project.add_master(user)
+ project.add_maintainer(user)
sign_in(user)
end
diff --git a/spec/controllers/projects/mattermosts_controller_spec.rb b/spec/controllers/projects/mattermosts_controller_spec.rb
index c5ac0be27bb..c2a334a849c 100644
--- a/spec/controllers/projects/mattermosts_controller_spec.rb
+++ b/spec/controllers/projects/mattermosts_controller_spec.rb
@@ -5,7 +5,7 @@ describe Projects::MattermostsController do
let!(:user) { create(:user) }
before do
- project.add_master(user)
+ project.add_maintainer(user)
sign_in(user)
end
diff --git a/spec/controllers/projects/merge_requests/creations_controller_spec.rb b/spec/controllers/projects/merge_requests/creations_controller_spec.rb
index 00d76f3c39a..d8995f98575 100644
--- a/spec/controllers/projects/merge_requests/creations_controller_spec.rb
+++ b/spec/controllers/projects/merge_requests/creations_controller_spec.rb
@@ -16,7 +16,7 @@ describe Projects::MergeRequests::CreationsController do
end
before do
- fork_project.add_master(user)
+ fork_project.add_maintainer(user)
Projects::ForkService.new(project, user).execute(fork_project)
sign_in(user)
end
@@ -94,7 +94,7 @@ describe Projects::MergeRequests::CreationsController do
let(:other_project) { create(:project, :repository) }
before do
- other_project.add_master(user)
+ other_project.add_maintainer(user)
end
context 'when the path exists in the diff' do
diff --git a/spec/controllers/projects/merge_requests/diffs_controller_spec.rb b/spec/controllers/projects/merge_requests/diffs_controller_spec.rb
index ec82b35f227..9dc06436c72 100644
--- a/spec/controllers/projects/merge_requests/diffs_controller_spec.rb
+++ b/spec/controllers/projects/merge_requests/diffs_controller_spec.rb
@@ -140,7 +140,7 @@ describe Projects::MergeRequests::DiffsController do
let(:other_project) { create(:project) }
before do
- other_project.add_master(user)
+ other_project.add_maintainer(user)
diff_for_path(old_path: existing_path, new_path: existing_path, project_id: other_project)
end
diff --git a/spec/controllers/projects/milestones_controller_spec.rb b/spec/controllers/projects/milestones_controller_spec.rb
index b1d83246238..ea906cf7f32 100644
--- a/spec/controllers/projects/milestones_controller_spec.rb
+++ b/spec/controllers/projects/milestones_controller_spec.rb
@@ -11,7 +11,7 @@ describe Projects::MilestonesController do
before do
sign_in(user)
- project.add_master(user)
+ project.add_maintainer(user)
controller.instance_variable_set(:@project, project)
end
diff --git a/spec/controllers/projects/pages_controller_spec.rb b/spec/controllers/projects/pages_controller_spec.rb
index 8d2fa6a1740..927b6e0c473 100644
--- a/spec/controllers/projects/pages_controller_spec.rb
+++ b/spec/controllers/projects/pages_controller_spec.rb
@@ -14,7 +14,7 @@ describe Projects::PagesController do
before do
allow(Gitlab.config.pages).to receive(:enabled).and_return(true)
sign_in(user)
- project.add_master(user)
+ project.add_maintainer(user)
end
describe 'GET show' do
diff --git a/spec/controllers/projects/pages_domains_controller_spec.rb b/spec/controllers/projects/pages_domains_controller_spec.rb
index d4058a5c515..75871eab1ab 100644
--- a/spec/controllers/projects/pages_domains_controller_spec.rb
+++ b/spec/controllers/projects/pages_domains_controller_spec.rb
@@ -19,7 +19,7 @@ describe Projects::PagesDomainsController do
before do
allow(Gitlab.config.pages).to receive(:enabled).and_return(true)
sign_in(user)
- project.add_master(user)
+ project.add_maintainer(user)
end
describe 'GET show' do
diff --git a/spec/controllers/projects/pipeline_schedules_controller_spec.rb b/spec/controllers/projects/pipeline_schedules_controller_spec.rb
index 4cdaa54e0bc..7179423dde2 100644
--- a/spec/controllers/projects/pipeline_schedules_controller_spec.rb
+++ b/spec/controllers/projects/pipeline_schedules_controller_spec.rb
@@ -121,7 +121,7 @@ describe Projects::PipelineSchedulesController do
it { expect { go }.to be_allowed_for(:admin) }
it { expect { go }.to be_allowed_for(:owner).of(project) }
- it { expect { go }.to be_allowed_for(:master).of(project) }
+ it { expect { go }.to be_allowed_for(:maintainer).of(project) }
it { expect { go }.to be_allowed_for(:developer).of(project) }
it { expect { go }.to be_denied_for(:reporter).of(project) }
it { expect { go }.to be_denied_for(:guest).of(project) }
@@ -274,7 +274,7 @@ describe Projects::PipelineSchedulesController do
it { expect { go }.to be_allowed_for(:admin) }
it { expect { go }.to be_allowed_for(:owner).of(project) }
- it { expect { go }.to be_allowed_for(:master).of(project) }
+ it { expect { go }.to be_allowed_for(:maintainer).of(project) }
it { expect { go }.to be_allowed_for(:developer).of(project).own(pipeline_schedule) }
it { expect { go }.to be_denied_for(:reporter).of(project) }
it { expect { go }.to be_denied_for(:guest).of(project) }
@@ -292,19 +292,19 @@ describe Projects::PipelineSchedulesController do
it { expect { go }.to be_allowed_for(developer_1) }
it { expect { go }.to be_denied_for(:developer).of(project) }
- it { expect { go }.to be_allowed_for(:master).of(project) }
+ it { expect { go }.to be_allowed_for(:maintainer).of(project) }
end
- context 'when a master created a pipeline schedule' do
- let(:master_1) { create(:user) }
- let!(:pipeline_schedule) { create(:ci_pipeline_schedule, project: project, owner: master_1) }
+ context 'when a maintainer created a pipeline schedule' do
+ let(:maintainer_1) { create(:user) }
+ let!(:pipeline_schedule) { create(:ci_pipeline_schedule, project: project, owner: maintainer_1) }
before do
- project.add_master(master_1)
+ project.add_maintainer(maintainer_1)
end
- it { expect { go }.to be_allowed_for(master_1) }
- it { expect { go }.to be_allowed_for(:master).of(project) }
+ it { expect { go }.to be_allowed_for(maintainer_1) }
+ it { expect { go }.to be_allowed_for(:maintainer).of(project) }
it { expect { go }.to be_denied_for(:developer).of(project) }
end
end
@@ -331,7 +331,7 @@ describe Projects::PipelineSchedulesController do
let(:user) { create(:user) }
before do
- project.add_master(user)
+ project.add_maintainer(user)
sign_in(user)
end
@@ -346,7 +346,7 @@ describe Projects::PipelineSchedulesController do
describe 'security' do
it { expect { go }.to be_allowed_for(:admin) }
it { expect { go }.to be_allowed_for(:owner).of(project) }
- it { expect { go }.to be_allowed_for(:master).of(project) }
+ it { expect { go }.to be_allowed_for(:maintainer).of(project) }
it { expect { go }.to be_allowed_for(:developer).of(project).own(pipeline_schedule) }
it { expect { go }.to be_denied_for(:reporter).of(project) }
it { expect { go }.to be_denied_for(:guest).of(project) }
@@ -364,7 +364,7 @@ describe Projects::PipelineSchedulesController do
describe 'security' do
it { expect { go }.to be_allowed_for(:admin) }
it { expect { go }.to be_allowed_for(:owner).of(project) }
- it { expect { go }.to be_allowed_for(:master).of(project) }
+ it { expect { go }.to be_allowed_for(:maintainer).of(project) }
it { expect { go }.to be_allowed_for(:developer).of(project).own(pipeline_schedule) }
it { expect { go }.to be_denied_for(:reporter).of(project) }
it { expect { go }.to be_denied_for(:guest).of(project) }
@@ -453,9 +453,9 @@ describe Projects::PipelineSchedulesController do
end
end
- context 'when a master makes the request' do
+ context 'when a maintainer makes the request' do
before do
- project.add_master(user)
+ project.add_maintainer(user)
sign_in(user)
end
diff --git a/spec/controllers/projects/pipelines_settings_controller_spec.rb b/spec/controllers/projects/pipelines_settings_controller_spec.rb
index 694896b6bcf..b1ba9f74e38 100644
--- a/spec/controllers/projects/pipelines_settings_controller_spec.rb
+++ b/spec/controllers/projects/pipelines_settings_controller_spec.rb
@@ -6,7 +6,7 @@ describe Projects::PipelinesSettingsController do
let(:project) { project_auto_devops.project }
before do
- project.add_master(user)
+ project.add_maintainer(user)
sign_in(user)
end
diff --git a/spec/controllers/projects/project_members_controller_spec.rb b/spec/controllers/projects/project_members_controller_spec.rb
index d84b31ad978..519af10d78c 100644
--- a/spec/controllers/projects/project_members_controller_spec.rb
+++ b/spec/controllers/projects/project_members_controller_spec.rb
@@ -37,7 +37,7 @@ describe Projects::ProjectMembersController do
context 'when user has enough rights' do
before do
- project.add_master(user)
+ project.add_maintainer(user)
end
it 'adds user to members' do
@@ -70,7 +70,7 @@ describe Projects::ProjectMembersController do
let(:requester) { create(:project_member, :access_request, project: project) }
before do
- project.add_master(user)
+ project.add_maintainer(user)
sign_in(user)
end
@@ -121,7 +121,7 @@ describe Projects::ProjectMembersController do
context 'when user has enough rights' do
before do
- project.add_master(user)
+ project.add_maintainer(user)
end
it '[HTML] removes user from members' do
@@ -181,7 +181,7 @@ describe Projects::ProjectMembersController do
let(:project) { create(:project, namespace: user.namespace) }
before do
- project.add_master(user)
+ project.add_maintainer(user)
end
it 'cannot remove themselves from the project' do
@@ -263,7 +263,7 @@ describe Projects::ProjectMembersController do
context 'when user has enough rights' do
before do
- project.add_master(user)
+ project.add_maintainer(user)
end
it 'adds user to members' do
@@ -285,7 +285,7 @@ describe Projects::ProjectMembersController do
let(:member) { create(:user) }
before do
- project.add_master(user)
+ project.add_maintainer(user)
another_project.add_guest(member)
sign_in(user)
end
@@ -332,7 +332,7 @@ describe Projects::ProjectMembersController do
context 'when creating owner' do
before do
- project.add_master(user)
+ project.add_maintainer(user)
sign_in(user)
end
@@ -346,9 +346,9 @@ describe Projects::ProjectMembersController do
end
end
- context 'when create master' do
+ context 'when create maintainer' do
before do
- project.add_master(user)
+ project.add_maintainer(user)
sign_in(user)
end
@@ -356,7 +356,7 @@ describe Projects::ProjectMembersController do
expect do
post :create, user_ids: stranger.id,
namespace_id: project.namespace,
- access_level: Member::MASTER,
+ access_level: Member::MAINTAINER,
project_id: project
end.to change { project.members.count }.by(1)
end
diff --git a/spec/controllers/projects/prometheus/metrics_controller_spec.rb b/spec/controllers/projects/prometheus/metrics_controller_spec.rb
index 871dcf5c796..5c56a712245 100644
--- a/spec/controllers/projects/prometheus/metrics_controller_spec.rb
+++ b/spec/controllers/projects/prometheus/metrics_controller_spec.rb
@@ -7,7 +7,7 @@ describe Projects::Prometheus::MetricsController do
let(:prometheus_adapter) { double('prometheus_adapter', can_query?: true) }
before do
- project.add_master(user)
+ project.add_maintainer(user)
sign_in(user)
end
diff --git a/spec/controllers/projects/protected_branches_controller_spec.rb b/spec/controllers/projects/protected_branches_controller_spec.rb
index 096e29bc39f..ac812707e74 100644
--- a/spec/controllers/projects/protected_branches_controller_spec.rb
+++ b/spec/controllers/projects/protected_branches_controller_spec.rb
@@ -8,7 +8,7 @@ describe Projects::ProtectedBranchesController do
let(:user) { create(:user) }
before do
- project.add_master(user)
+ project.add_maintainer(user)
end
describe "GET #index" do
@@ -20,10 +20,10 @@ describe Projects::ProtectedBranchesController do
end
describe "POST #create" do
- let(:master_access_level) { [{ access_level: Gitlab::Access::MASTER }] }
+ let(:maintainer_access_level) { [{ access_level: Gitlab::Access::MAINTAINER }] }
let(:access_level_params) do
- { merge_access_levels_attributes: master_access_level,
- push_access_levels_attributes: master_access_level }
+ { merge_access_levels_attributes: maintainer_access_level,
+ push_access_levels_attributes: maintainer_access_level }
end
let(:create_params) { attributes_for(:protected_branch).merge(access_level_params) }
diff --git a/spec/controllers/projects/protected_tags_controller_spec.rb b/spec/controllers/projects/protected_tags_controller_spec.rb
index b6de90039f3..20440c5a5d5 100644
--- a/spec/controllers/projects/protected_tags_controller_spec.rb
+++ b/spec/controllers/projects/protected_tags_controller_spec.rb
@@ -15,7 +15,7 @@ describe Projects::ProtectedTagsController do
let(:user) { create(:user) }
before do
- project.add_master(user)
+ project.add_maintainer(user)
sign_in(user)
end
diff --git a/spec/controllers/projects/runners_controller_spec.rb b/spec/controllers/projects/runners_controller_spec.rb
index 2082dd2cff0..b1e0b496ede 100644
--- a/spec/controllers/projects/runners_controller_spec.rb
+++ b/spec/controllers/projects/runners_controller_spec.rb
@@ -15,7 +15,7 @@ describe Projects::RunnersController do
before do
sign_in(user)
- project.add_master(user)
+ project.add_maintainer(user)
end
describe '#update' do
diff --git a/spec/controllers/projects/services_controller_spec.rb b/spec/controllers/projects/services_controller_spec.rb
index 61f35cf325b..45cea8c1351 100644
--- a/spec/controllers/projects/services_controller_spec.rb
+++ b/spec/controllers/projects/services_controller_spec.rb
@@ -9,7 +9,7 @@ describe Projects::ServicesController do
before do
sign_in(user)
- project.add_master(user)
+ project.add_maintainer(user)
end
describe '#test' do
diff --git a/spec/controllers/projects/settings/ci_cd_controller_spec.rb b/spec/controllers/projects/settings/ci_cd_controller_spec.rb
index d53fe9bf734..1f14a0cc381 100644
--- a/spec/controllers/projects/settings/ci_cd_controller_spec.rb
+++ b/spec/controllers/projects/settings/ci_cd_controller_spec.rb
@@ -6,7 +6,7 @@ describe Projects::Settings::CiCdController do
let(:project) { project_auto_devops.project }
before do
- project.add_master(user)
+ project.add_maintainer(user)
sign_in(user)
end
@@ -27,7 +27,7 @@ describe Projects::Settings::CiCdController do
let!(:shared_runner) { create(:ci_runner, :instance) }
it 'sets assignable project runners only' do
- group.add_master(user)
+ group.add_maintainer(user)
get :show, namespace_id: project.namespace, project_id: project
@@ -40,7 +40,7 @@ describe Projects::Settings::CiCdController do
before do
sign_in(user)
- project.add_master(user)
+ project.add_maintainer(user)
allow(ResetProjectCacheService).to receive_message_chain(:new, :execute).and_return(true)
end
diff --git a/spec/controllers/projects/settings/integrations_controller_spec.rb b/spec/controllers/projects/settings/integrations_controller_spec.rb
index 77df9a6f567..a2484c04c7a 100644
--- a/spec/controllers/projects/settings/integrations_controller_spec.rb
+++ b/spec/controllers/projects/settings/integrations_controller_spec.rb
@@ -5,7 +5,7 @@ describe Projects::Settings::IntegrationsController do
let(:user) { create(:user) }
before do
- project.add_master(user)
+ project.add_maintainer(user)
sign_in(user)
end
diff --git a/spec/controllers/projects/settings/repository_controller_spec.rb b/spec/controllers/projects/settings/repository_controller_spec.rb
index 3a4014b7768..9cee40b7553 100644
--- a/spec/controllers/projects/settings/repository_controller_spec.rb
+++ b/spec/controllers/projects/settings/repository_controller_spec.rb
@@ -5,7 +5,7 @@ describe Projects::Settings::RepositoryController do
let(:user) { create(:user) }
before do
- project.add_master(user)
+ project.add_maintainer(user)
sign_in(user)
end
diff --git a/spec/controllers/projects/snippets_controller_spec.rb b/spec/controllers/projects/snippets_controller_spec.rb
index e7c0b484ede..9c383bd7628 100644
--- a/spec/controllers/projects/snippets_controller_spec.rb
+++ b/spec/controllers/projects/snippets_controller_spec.rb
@@ -6,8 +6,8 @@ describe Projects::SnippetsController do
let(:user2) { create(:user) }
before do
- project.add_master(user)
- project.add_master(user2)
+ project.add_maintainer(user)
+ project.add_maintainer(user2)
end
describe 'GET #index' do
@@ -291,7 +291,7 @@ describe Projects::SnippetsController do
def mark_as_spam
admin = create(:admin)
create(:user_agent_detail, subject: snippet)
- project.add_master(admin)
+ project.add_maintainer(admin)
sign_in(admin)
post :mark_as_spam,
diff --git a/spec/controllers/projects/templates_controller_spec.rb b/spec/controllers/projects/templates_controller_spec.rb
index 8fcfa3c9ecd..d7f07aa2b01 100644
--- a/spec/controllers/projects/templates_controller_spec.rb
+++ b/spec/controllers/projects/templates_controller_spec.rb
@@ -13,7 +13,7 @@ describe Projects::TemplatesController do
end
before do
- project.add_user(user, Gitlab::Access::MASTER)
+ project.add_user(user, Gitlab::Access::MAINTAINER)
project.repository.create_file(user, file_path_1, 'something valid',
message: 'test 3', branch_name: 'master')
end
diff --git a/spec/controllers/projects/tree_controller_spec.rb b/spec/controllers/projects/tree_controller_spec.rb
index d3188f054cf..9982b49eebb 100644
--- a/spec/controllers/projects/tree_controller_spec.rb
+++ b/spec/controllers/projects/tree_controller_spec.rb
@@ -7,7 +7,7 @@ describe Projects::TreeController do
before do
sign_in(user)
- project.add_master(user)
+ project.add_maintainer(user)
controller.instance_variable_set(:@project, project)
end
diff --git a/spec/controllers/projects/variables_controller_spec.rb b/spec/controllers/projects/variables_controller_spec.rb
index 68019743be0..9afd1f751c6 100644
--- a/spec/controllers/projects/variables_controller_spec.rb
+++ b/spec/controllers/projects/variables_controller_spec.rb
@@ -6,7 +6,7 @@ describe Projects::VariablesController do
before do
sign_in(user)
- project.add_master(user)
+ project.add_maintainer(user)
end
describe 'GET #show' do
diff --git a/spec/controllers/projects_controller_spec.rb b/spec/controllers/projects_controller_spec.rb
index fd7d867f9e5..94644b1f9fd 100644
--- a/spec/controllers/projects_controller_spec.rb
+++ b/spec/controllers/projects_controller_spec.rb
@@ -759,7 +759,7 @@ describe ProjectsController do
before do
sign_in(user)
- project.add_master(user)
+ project.add_maintainer(user)
end
context 'when project export is enabled' do
@@ -787,7 +787,7 @@ describe ProjectsController do
before do
sign_in(user)
- project.add_master(user)
+ project.add_maintainer(user)
end
context 'object storage disabled' do
@@ -847,7 +847,7 @@ describe ProjectsController do
before do
sign_in(user)
- project.add_master(user)
+ project.add_maintainer(user)
end
context 'when project export is enabled' do
@@ -875,7 +875,7 @@ describe ProjectsController do
before do
sign_in(user)
- project.add_master(user)
+ project.add_maintainer(user)
end
context 'when project export is enabled' do
diff --git a/spec/controllers/uploads_controller_spec.rb b/spec/controllers/uploads_controller_spec.rb
index eb94d395a9e..bcf289f36a9 100644
--- a/spec/controllers/uploads_controller_spec.rb
+++ b/spec/controllers/uploads_controller_spec.rb
@@ -269,13 +269,13 @@ describe UploadsController do
context "when the user has access to the project" do
before do
- project.add_master(user)
+ project.add_maintainer(user)
end
context "when the user is blocked" do
before do
user.block
- project.add_master(user)
+ project.add_maintainer(user)
end
it "redirects to the sign in page" do
@@ -475,13 +475,13 @@ describe UploadsController do
context "when the user has access to the project" do
before do
- project.add_master(user)
+ project.add_maintainer(user)
end
context "when the user is blocked" do
before do
user.block
- project.add_master(user)
+ project.add_maintainer(user)
end
it "redirects to the sign in page" do