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:
authorPawel Chojnacki <pawel@chojnacki.ws>2017-04-28 17:05:00 +0300
committerPawel Chojnacki <pawel@chojnacki.ws>2017-04-28 17:05:00 +0300
commit19edeba8e3e8d091853ceed27f271cd67a636551 (patch)
tree69aec50650e2a771b5d601e3ac12436620dee65c /spec/lib/gitlab/user_access_spec.rb
parent61046e75d8e6f660e55f4f7b5a76238611a0f48f (diff)
Prevent people from creating branches if they don't have persmission to push
Diffstat (limited to 'spec/lib/gitlab/user_access_spec.rb')
-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