diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-03 15:08:08 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-03 15:08:08 +0000 |
commit | 946771d0b016ae92b15a60bc3290a33b94191ffe (patch) | |
tree | 64862c2433989483f5fce45d5539242577a362eb /spec/lib/gitlab/checks | |
parent | f1e2fca19a90a6992c2020cf8c2159cfb0b61bca (diff) | |
download | gitlab-ce-946771d0b016ae92b15a60bc3290a33b94191ffe.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/gitlab/checks')
-rw-r--r-- | spec/lib/gitlab/checks/snippet_check_spec.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/lib/gitlab/checks/snippet_check_spec.rb b/spec/lib/gitlab/checks/snippet_check_spec.rb index 7cfcde7183f..43c69ab7042 100644 --- a/spec/lib/gitlab/checks/snippet_check_spec.rb +++ b/spec/lib/gitlab/checks/snippet_check_spec.rb @@ -25,10 +25,19 @@ describe Gitlab::Checks::SnippetCheck do context 'trying to create the branch' do let(:oldrev) { '0000000000000000000000000000000000000000' } + let(:ref) { 'refs/heads/feature' } it 'raises an error' do expect { subject.exec }.to raise_error(Gitlab::GitAccess::ForbiddenError, 'You can not create or delete branches.') end + + context "when branch is 'master'" do + let(:ref) { 'refs/heads/master' } + + it "allows the operation" do + expect { subject.exec }.not_to raise_error + end + end end end end |