diff options
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' |