summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Chao <mchao@gitlab.com>2018-06-05 15:01:46 +0900
committerMark Chao <mchao@gitlab.com>2018-06-22 10:24:00 +0800
commit4378d6839cee708be2a0bc3b6e5cef60c406f819 (patch)
treeb14c69b0c914f0cb73e48d18f64d3f530d63f75f
parent95556da5f66cc76e1187a9b79df8909196221461 (diff)
downloadgitlab-ce-4378d6839cee708be2a0bc3b6e5cef60c406f819.tar.gz
traits
-rw-r--r--spec/factories/protected_branches.rb2
-rw-r--r--spec/factories/protected_tags.rb2
-rw-r--r--spec/lib/gitlab/ci/status/build/play_spec.rb2
-rw-r--r--spec/models/concerns/protected_ref_access_spec.rb2
-rw-r--r--spec/models/project_spec.rb2
-rw-r--r--spec/policies/ci/build_policy_spec.rb2
-rw-r--r--spec/services/ci/retry_pipeline_service_spec.rb2
7 files changed, 7 insertions, 7 deletions
diff --git a/spec/factories/protected_branches.rb b/spec/factories/protected_branches.rb
index 4af49c03dc8..5457c0d2a8f 100644
--- a/spec/factories/protected_branches.rb
+++ b/spec/factories/protected_branches.rb
@@ -39,7 +39,7 @@ FactoryBot.define do
end
end
- trait :masters_can_push do
+ trait :maintainers_can_push do
transient do
default_push_level false
end
diff --git a/spec/factories/protected_tags.rb b/spec/factories/protected_tags.rb
index d0db569e164..2b81d089549 100644
--- a/spec/factories/protected_tags.rb
+++ b/spec/factories/protected_tags.rb
@@ -27,7 +27,7 @@ FactoryBot.define do
end
end
- trait :masters_can_create do
+ trait :maintainers_can_create do
transient do
default_access_level false
end
diff --git a/spec/lib/gitlab/ci/status/build/play_spec.rb b/spec/lib/gitlab/ci/status/build/play_spec.rb
index e2bb378f663..02f8c4c114b 100644
--- a/spec/lib/gitlab/ci/status/build/play_spec.rb
+++ b/spec/lib/gitlab/ci/status/build/play_spec.rb
@@ -46,7 +46,7 @@ describe Gitlab::Ci::Status::Build::Play do
context 'when user can not push to the branch' do
before do
build.project.add_developer(user)
- create(:protected_branch, :masters_can_push,
+ create(:protected_branch, :maintainers_can_push,
name: build.ref, project: project)
end
diff --git a/spec/models/concerns/protected_ref_access_spec.rb b/spec/models/concerns/protected_ref_access_spec.rb
index 14ce1084742..ce602337647 100644
--- a/spec/models/concerns/protected_ref_access_spec.rb
+++ b/spec/models/concerns/protected_ref_access_spec.rb
@@ -2,7 +2,7 @@ require 'spec_helper'
describe ProtectedRefAccess do
subject(:protected_ref_access) do
- create(:protected_branch, :masters_can_push).push_access_levels.first
+ create(:protected_branch, :maintainers_can_push).push_access_levels.first
end
let(:project) { protected_ref_access.project }
diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb
index 3914f2e6f11..09dc253e641 100644
--- a/spec/models/project_spec.rb
+++ b/spec/models/project_spec.rb
@@ -3705,7 +3705,7 @@ describe Project do
end
it 'does not allow access if the user cannot merge the merge request' do
- create(:protected_branch, :masters_can_push, project: target_project, name: 'target-branch')
+ create(:protected_branch, :maintainers_can_push, project: target_project, name: 'target-branch')
expect(project.branch_allows_collaboration?(user, 'awesome-feature-1'))
.to be_falsy
diff --git a/spec/policies/ci/build_policy_spec.rb b/spec/policies/ci/build_policy_spec.rb
index d475d651baa..370f606dfac 100644
--- a/spec/policies/ci/build_policy_spec.rb
+++ b/spec/policies/ci/build_policy_spec.rb
@@ -211,7 +211,7 @@ describe Ci::BuildPolicy do
context 'when maintainers can push to the branch' do
before do
- create(:protected_branch, :masters_can_push,
+ create(:protected_branch, :maintainers_can_push,
name: build.ref, project: project)
end
diff --git a/spec/services/ci/retry_pipeline_service_spec.rb b/spec/services/ci/retry_pipeline_service_spec.rb
index 9dabe5c50e9..55445e71539 100644
--- a/spec/services/ci/retry_pipeline_service_spec.rb
+++ b/spec/services/ci/retry_pipeline_service_spec.rb
@@ -237,7 +237,7 @@ describe Ci::RetryPipelineService, '#execute' do
context 'when user is not allowed to trigger manual action' do
before do
project.add_developer(user)
- create(:protected_branch, :masters_can_push,
+ create(:protected_branch, :maintainers_can_push,
name: pipeline.ref, project: project)
end