diff options
author | Eric <eric.yu@twosigma.com> | 2017-08-02 10:16:17 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-08-02 10:16:17 +0000 |
commit | fb5b2d8d0eb544630f97233731466a18380301c7 (patch) | |
tree | 692486a690ae1b8b5153fc72ccd4e0e860281159 /spec/factories | |
parent | 30413fd2fffb42424d83c68814a2e8e70bf94671 (diff) | |
download | gitlab-ce-fb5b2d8d0eb544630f97233731466a18380301c7.tar.gz |
Extending API for protected branches
Diffstat (limited to 'spec/factories')
-rw-r--r-- | spec/factories/protected_branches.rb | 6 |
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 |