diff options
author | Mark Chao <mchao@gitlab.com> | 2018-07-11 17:36:08 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2018-07-11 17:36:08 +0300 |
commit | a63bce1a4b55bc6cbafb9dec12d33028521489e9 (patch) | |
tree | ee9466e6b06536a65d4e851f4096679c6f968d1e /spec/policies/ci | |
parent | 1bf54e092783f7ad388225d32ab79ac1e845559c (diff) |
Resolve "Rename the `Master` role to `Maintainer`" Backend
Diffstat (limited to 'spec/policies/ci')
-rw-r--r-- | spec/policies/ci/build_policy_spec.rb | 10 | ||||
-rw-r--r-- | spec/policies/ci/pipeline_schedule_policy_spec.rb | 8 | ||||
-rw-r--r-- | spec/policies/ci/trigger_policy_spec.rb | 12 |
3 files changed, 15 insertions, 15 deletions
diff --git a/spec/policies/ci/build_policy_spec.rb b/spec/policies/ci/build_policy_spec.rb index eead55d33ca..79a616899fa 100644 --- a/spec/policies/ci/build_policy_spec.rb +++ b/spec/policies/ci/build_policy_spec.rb @@ -204,18 +204,18 @@ describe Ci::BuildPolicy do end end - context 'when a master erases a build' do + context 'when a maintainer erases a build' do before do - project.add_master(user) + project.add_maintainer(user) end - context 'when masters can push to the branch' 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 - context 'when the build was created by the master' do + context 'when the build was created by the maintainer' do let(:owner) { user } it { expect(policy).to be_allowed :erase_build } diff --git a/spec/policies/ci/pipeline_schedule_policy_spec.rb b/spec/policies/ci/pipeline_schedule_policy_spec.rb index c0c3eda4911..f1d3cd04e32 100644 --- a/spec/policies/ci/pipeline_schedule_policy_spec.rb +++ b/spec/policies/ci/pipeline_schedule_policy_spec.rb @@ -77,9 +77,9 @@ describe Ci::PipelineSchedulePolicy, :models do end end - describe 'rules for a master' do + describe 'rules for a maintainer' do before do - project.add_master(user) + project.add_maintainer(user) end it 'includes abilities to do do all operations on pipeline schedule' do @@ -93,8 +93,8 @@ describe Ci::PipelineSchedulePolicy, :models do let(:owner) { create(:user) } before do - project.add_master(owner) - project.add_master(user) + project.add_maintainer(owner) + project.add_maintainer(user) pipeline_schedule.update(owner: owner) end diff --git a/spec/policies/ci/trigger_policy_spec.rb b/spec/policies/ci/trigger_policy_spec.rb index 14630748c90..d8a63066265 100644 --- a/spec/policies/ci/trigger_policy_spec.rb +++ b/spec/policies/ci/trigger_policy_spec.rb @@ -43,9 +43,9 @@ describe Ci::TriggerPolicy do context 'when owner is undefined' do let(:owner) { nil } - context 'when user is master of the project' do + context 'when user is maintainer of the project' do before do - project.add_master(user) + project.add_maintainer(user) end it_behaves_like 'allows to admin and manage trigger' @@ -67,9 +67,9 @@ describe Ci::TriggerPolicy do context 'when owner is an user' do let(:owner) { user } - context 'when user is master of the project' do + context 'when user is maintainer of the project' do before do - project.add_master(user) + project.add_maintainer(user) end it_behaves_like 'allows to admin and manage trigger' @@ -79,9 +79,9 @@ describe Ci::TriggerPolicy do context 'when owner is another user' do let(:owner) { create(:user) } - context 'when user is master of the project' do + context 'when user is maintainer of the project' do before do - project.add_master(user) + project.add_maintainer(user) end it_behaves_like 'allows to manage trigger' |