summaryrefslogtreecommitdiff
path: root/spec/lib
diff options
context:
space:
mode:
authorPawel Chojnacki <pawel@chojnacki.ws>2017-04-28 16:05:00 +0200
committerPawel Chojnacki <pawel@chojnacki.ws>2017-04-28 16:05:00 +0200
commit19edeba8e3e8d091853ceed27f271cd67a636551 (patch)
tree69aec50650e2a771b5d601e3ac12436620dee65c /spec/lib
parent61046e75d8e6f660e55f4f7b5a76238611a0f48f (diff)
downloadgitlab-ce-19edeba8e3e8d091853ceed27f271cd67a636551.tar.gz
Prevent people from creating branches if they don't have persmission to push
Diffstat (limited to 'spec/lib')
-rw-r--r--spec/lib/gitlab/user_access_spec.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/lib/gitlab/user_access_spec.rb b/spec/lib/gitlab/user_access_spec.rb
index 611cdbbc865..2b27ff66c09 100644
--- a/spec/lib/gitlab/user_access_spec.rb
+++ b/spec/lib/gitlab/user_access_spec.rb
@@ -87,10 +87,10 @@ describe Gitlab::UserAccess, lib: true do
expect(access.can_push_to_branch?(branch.name)).to be_falsey
end
- it 'returns true if branch does not exist and user has permission to merge' do
+ it 'returns false if branch does not exist' do
project.team << [user, :developer]
- expect(access.can_push_to_branch?(not_existing_branch.name)).to be_truthy
+ expect(access.can_push_to_branch?(not_existing_branch.name)).to be_falsey
end
end