Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric <eric.yu@twosigma.com>2017-08-02 13:16:17 +0300
committerRémy Coutable <remy@rymai.me>2017-08-02 13:16:17 +0300
commitfb5b2d8d0eb544630f97233731466a18380301c7 (patch)
tree692486a690ae1b8b5153fc72ccd4e0e860281159 /spec/factories/protected_branches.rb
parent30413fd2fffb42424d83c68814a2e8e70bf94671 (diff)
Extending API for protected branches
Diffstat (limited to 'spec/factories/protected_branches.rb')
-rw-r--r--spec/factories/protected_branches.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/factories/protected_branches.rb b/spec/factories/protected_branches.rb
index 3dbace4b38a..fe0cbfc4444 100644
--- a/spec/factories/protected_branches.rb
+++ b/spec/factories/protected_branches.rb
@@ -57,5 +57,11 @@ FactoryGirl.define do
protected_branch.merge_access_levels.new(access_level: Gitlab::Access::MASTER)
end
end
+
+ trait :no_one_can_merge do
+ after(:create) do |protected_branch|
+ protected_branch.merge_access_levels.first.update!(access_level: Gitlab::Access::NO_ACCESS)
+ end
+ end
end
end