summaryrefslogtreecommitdiff
path: root/spec/presenters
diff options
context:
space:
mode:
authorMark Chao <mchao@gitlab.com>2018-07-11 14:36:08 +0000
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2018-07-11 14:36:08 +0000
commita63bce1a4b55bc6cbafb9dec12d33028521489e9 (patch)
treeee9466e6b06536a65d4e851f4096679c6f968d1e /spec/presenters
parent1bf54e092783f7ad388225d32ab79ac1e845559c (diff)
downloadgitlab-ce-a63bce1a4b55bc6cbafb9dec12d33028521489e9.tar.gz
Resolve "Rename the `Master` role to `Maintainer`" Backend
Diffstat (limited to 'spec/presenters')
-rw-r--r--spec/presenters/merge_request_presenter_spec.rb6
-rw-r--r--spec/presenters/project_presenter_spec.rb8
2 files changed, 7 insertions, 7 deletions
diff --git a/spec/presenters/merge_request_presenter_spec.rb b/spec/presenters/merge_request_presenter_spec.rb
index e3b37739e8e..46ba6f442f5 100644
--- a/spec/presenters/merge_request_presenter_spec.rb
+++ b/spec/presenters/merge_request_presenter_spec.rb
@@ -270,7 +270,7 @@ describe MergeRequestPresenter do
context 'when can create issue and issues enabled' do
it 'returns path' do
allow(project).to receive(:issues_enabled?) { true }
- project.add_master(user)
+ project.add_maintainer(user)
is_expected
.to eq("/#{resource.project.full_path}/issues/new?merge_request_to_resolve_discussions_of=#{resource.iid}")
@@ -288,7 +288,7 @@ describe MergeRequestPresenter do
context 'when issues disabled' do
it 'returns nil' do
allow(project).to receive(:issues_enabled?) { false }
- project.add_master(user)
+ project.add_maintainer(user)
is_expected.to be_nil
end
@@ -307,7 +307,7 @@ describe MergeRequestPresenter do
context 'when merge request enabled and has permission' do
it 'has remove_wip_path' do
allow(project).to receive(:merge_requests_enabled?) { true }
- project.add_master(user)
+ project.add_maintainer(user)
is_expected
.to eq("/#{resource.project.full_path}/merge_requests/#{resource.iid}/remove_wip")
diff --git a/spec/presenters/project_presenter_spec.rb b/spec/presenters/project_presenter_spec.rb
index 830d2ee3b20..01085dbcb49 100644
--- a/spec/presenters/project_presenter_spec.rb
+++ b/spec/presenters/project_presenter_spec.rb
@@ -326,7 +326,7 @@ describe ProjectPresenter do
context 'when user can admin pipeline and CI yml does not exists' do
it 'returns anchor data' do
- project.add_master(user)
+ project.add_maintainer(user)
allow(project).to receive(:auto_devops_enabled?).and_return(false)
allow(project.repository).to receive(:gitlab_ci_yml).and_return(nil)
@@ -340,7 +340,7 @@ describe ProjectPresenter do
describe '#kubernetes_cluster_anchor_data' do
context 'when user can create Kubernetes cluster' do
it 'returns link to cluster if only one exists' do
- project.add_master(user)
+ project.add_maintainer(user)
cluster = create(:cluster, projects: [project])
expect(presenter.kubernetes_cluster_anchor_data).to eq(OpenStruct.new(enabled: true,
@@ -349,7 +349,7 @@ describe ProjectPresenter do
end
it 'returns link to clusters page if more than one exists' do
- project.add_master(user)
+ project.add_maintainer(user)
create(:cluster, :production_environment, projects: [project])
create(:cluster, projects: [project])
@@ -359,7 +359,7 @@ describe ProjectPresenter do
end
it 'returns link to create a cluster if no cluster exists' do
- project.add_master(user)
+ project.add_maintainer(user)
expect(presenter.kubernetes_cluster_anchor_data).to eq(OpenStruct.new(enabled: false,
label: 'Add Kubernetes cluster',