summaryrefslogtreecommitdiff
path: root/spec/controllers
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2017-07-04 05:58:28 +0800
committerLin Jen-Shin <godfat@godfat.org>2017-07-04 21:56:41 +0800
commit28553dbc05989b698777ee085aa2a357ffe576d2 (patch)
tree8005538c73dd33ce949047d201f8d2b55ba2294e /spec/controllers
parent005870d5ce1a00b3405d0ae3a639d0c4befcb7a2 (diff)
downloadgitlab-ce-28553dbc05989b698777ee085aa2a357ffe576d2.tar.gz
Update tests due to permission changes
Diffstat (limited to 'spec/controllers')
-rw-r--r--spec/controllers/projects/jobs_controller_spec.rb10
-rw-r--r--spec/controllers/projects/pipelines_controller_spec.rb8
2 files changed, 9 insertions, 9 deletions
diff --git a/spec/controllers/projects/jobs_controller_spec.rb b/spec/controllers/projects/jobs_controller_spec.rb
index 472e5fc51a0..9ed48d98360 100644
--- a/spec/controllers/projects/jobs_controller_spec.rb
+++ b/spec/controllers/projects/jobs_controller_spec.rb
@@ -218,7 +218,7 @@ describe Projects::JobsController do
describe 'POST retry' do
before do
- project.add_developer(user)
+ project.add_master(user)
sign_in(user)
post_retry
@@ -250,7 +250,7 @@ describe Projects::JobsController do
describe 'POST play' do
before do
- project.add_developer(user)
+ project.add_master(user)
create(:protected_branch, :developers_can_merge,
name: 'master', project: project)
@@ -290,7 +290,7 @@ describe Projects::JobsController do
describe 'POST cancel' do
before do
- project.add_developer(user)
+ project.add_master(user)
sign_in(user)
post_cancel
@@ -326,7 +326,7 @@ describe Projects::JobsController do
describe 'POST cancel_all' do
before do
- project.add_developer(user)
+ project.add_master(user)
sign_in(user)
end
@@ -368,7 +368,7 @@ describe Projects::JobsController do
describe 'POST erase' do
before do
- project.add_developer(user)
+ project.add_master(user)
sign_in(user)
post_erase
diff --git a/spec/controllers/projects/pipelines_controller_spec.rb b/spec/controllers/projects/pipelines_controller_spec.rb
index 734532668d3..3b4d7d069c9 100644
--- a/spec/controllers/projects/pipelines_controller_spec.rb
+++ b/spec/controllers/projects/pipelines_controller_spec.rb
@@ -8,7 +8,7 @@ describe Projects::PipelinesController do
let(:feature) { ProjectFeature::DISABLED }
before do
- project.add_developer(user)
+ project.add_master(user)
project.project_feature.update(
builds_access_level: feature)
@@ -158,7 +158,7 @@ describe Projects::PipelinesController do
context 'when builds are enabled' do
let(:feature) { ProjectFeature::ENABLED }
-
+
it 'retries a pipeline without returning any content' do
expect(response).to have_http_status(:no_content)
expect(build.reload).to be_retried
@@ -175,7 +175,7 @@ describe Projects::PipelinesController do
describe 'POST cancel.json' do
let!(:pipeline) { create(:ci_pipeline, project: project) }
let!(:build) { create(:ci_build, :running, pipeline: pipeline) }
-
+
before do
post :cancel, namespace_id: project.namespace,
project_id: project,
@@ -185,7 +185,7 @@ describe Projects::PipelinesController do
context 'when builds are enabled' do
let(:feature) { ProjectFeature::ENABLED }
-
+
it 'cancels a pipeline without returning any content' do
expect(response).to have_http_status(:no_content)
expect(pipeline.reload).to be_canceled