summaryrefslogtreecommitdiff
path: root/spec/models/concerns
diff options
context:
space:
mode:
authorImre Farkas <ifarkas@gitlab.com>2019-04-09 15:38:58 +0000
committerAndreas Brandl <abrandl@gitlab.com>2019-04-09 15:38:58 +0000
commit9bc5ed14fe97fe63cd5be30c013c6af978715621 (patch)
tree74e1548a29b4683e94720b346a4fc41a068b2583 /spec/models/concerns
parenta6218f1bcd78f656d57330e764d3f98e1fb1f3f3 (diff)
downloadgitlab-ce-9bc5ed14fe97fe63cd5be30c013c6af978715621.tar.gz
Move Contribution Analytics related spec in spec/features/groups/group_page_with_external_authorization_service_spec to EE
Diffstat (limited to 'spec/models/concerns')
-rw-r--r--spec/models/concerns/protected_ref_access_spec.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/models/concerns/protected_ref_access_spec.rb b/spec/models/concerns/protected_ref_access_spec.rb
index 94798f0590d..f63ad958ed3 100644
--- a/spec/models/concerns/protected_ref_access_spec.rb
+++ b/spec/models/concerns/protected_ref_access_spec.rb
@@ -3,6 +3,8 @@
require 'spec_helper'
describe ProtectedRefAccess do
+ include ExternalAuthorizationServiceHelpers
+
subject(:protected_ref_access) do
create(:protected_branch, :maintainers_can_push).push_access_levels.first
end
@@ -29,5 +31,15 @@ describe ProtectedRefAccess do
expect(protected_ref_access.check_access(developer)).to be_falsy
end
+
+ context 'external authorization' do
+ it 'is false if external authorization denies access' do
+ maintainer = create(:user)
+ project.add_maintainer(maintainer)
+ external_service_deny_access(maintainer, project)
+
+ expect(protected_ref_access.check_access(maintainer)).to be_falsey
+ end
+ end
end
end