diff options
author | Oswaldo Ferreira <oswaldo@gitlab.com> | 2019-04-24 21:17:46 +0300 |
---|---|---|
committer | Oswaldo Ferreira <oswaldo@gitlab.com> | 2019-04-25 19:06:06 +0300 |
commit | 8f59ea33e7d3dceb63bc5953a5b27d5968536287 (patch) | |
tree | 3475f7fe585faa0b5149a566e0596846d7fe9279 /spec/features/protected_branches_spec.rb | |
parent | c719bc4966bb5eb402ef4b8c03b869eccc430c6d (diff) |
Extract EE specific tests for protected branches/tags
We have the spec files containing EE specific code for
spec/features/protected_branches_spec.rb and
spec/features/protected_tags_spec.rb.
This commit deletes / extracts the CE part of it.
Diffstat (limited to 'spec/features/protected_branches_spec.rb')
-rw-r--r-- | spec/features/protected_branches_spec.rb | 26 |
1 files changed, 6 insertions, 20 deletions
diff --git a/spec/features/protected_branches_spec.rb b/spec/features/protected_branches_spec.rb index 0aff916ec83..0dbff5a2701 100644 --- a/spec/features/protected_branches_spec.rb +++ b/spec/features/protected_branches_spec.rb @@ -1,6 +1,8 @@ require 'spec_helper' describe 'Protected Branches', :js do + include ProtectedBranchHelpers + let(:user) { create(:user) } let(:admin) { create(:admin) } let(:project) { create(:project, :repository) } @@ -150,27 +152,11 @@ describe 'Protected Branches', :js do end describe "access control" do - include_examples "protected branches > access control > CE" - end - end - - def set_protected_branch_name(branch_name) - find(".js-protected-branch-select").click - find(".dropdown-input-field").set(branch_name) - click_on("Create wildcard #{branch_name}") - end - - def set_defaults - find(".js-allowed-to-merge").click - within('.qa-allowed-to-merge-dropdown') do - expect(first("li")).to have_content("Roles") - find(:link, 'No one').click - end + before do + stub_licensed_features(protected_refs_for_users: false) + end - find(".js-allowed-to-push").click - within('.qa-allowed-to-push-dropdown') do - expect(first("li")).to have_content("Roles") - find(:link, 'No one').click + include_examples "protected branches > access control > CE" end end end |