diff options
Diffstat (limited to 'spec/lib')
-rw-r--r-- | spec/lib/gitlab/checks/tag_check_spec.rb | 5 | ||||
-rw-r--r-- | spec/lib/gitlab/ci/ansi2html_spec.rb | 4 | ||||
-rw-r--r-- | spec/lib/gitlab/git_access_spec.rb | 2 |
3 files changed, 5 insertions, 6 deletions
diff --git a/spec/lib/gitlab/checks/tag_check_spec.rb b/spec/lib/gitlab/checks/tag_check_spec.rb index b1258270611..80e9eb504ad 100644 --- a/spec/lib/gitlab/checks/tag_check_spec.rb +++ b/spec/lib/gitlab/checks/tag_check_spec.rb @@ -8,9 +8,8 @@ describe Gitlab::Checks::TagCheck do describe '#validate!' do let(:ref) { 'refs/tags/v1.0.0' } - it 'raises an error' do - allow(user_access).to receive(:can_do_action?).with(:push_code).and_return(true) - expect(user_access).to receive(:can_do_action?).with(:admin_project).and_return(false) + it 'raises an error when user does not have access' do + allow(user_access).to receive(:can_do_action?).with(:admin_tag).and_return(false) expect { subject.validate! }.to raise_error(Gitlab::GitAccess::UnauthorizedError, 'You are not allowed to change existing tags on this project.') end diff --git a/spec/lib/gitlab/ci/ansi2html_spec.rb b/spec/lib/gitlab/ci/ansi2html_spec.rb index 655c5d20d7f..aa4e358b148 100644 --- a/spec/lib/gitlab/ci/ansi2html_spec.rb +++ b/spec/lib/gitlab/ci/ansi2html_spec.rb @@ -231,8 +231,8 @@ describe Gitlab::Ci::Ansi2html do it 'prints light red' do text = "#{section_start}\e[91mHello\e[0m\n#{section_end}" - header = %{<span class="term-fg-l-red section js-section-header js-s-#{class_name(section_name)}">Hello</span>} - line_break = %{<span class="section js-section-header js-s-#{class_name(section_name)}"></span><br/>} + header = %{<span class="term-fg-l-red section js-section-header section-header js-s-#{class_name(section_name)}">Hello</span>} + line_break = %{<span class="section js-section-header section-header js-s-#{class_name(section_name)}"></span><br/>} line = %{<span class="section line s_#{class_name(section_name)}"></span>} empty_line = %{<span class="section js-s-#{class_name(section_name)}"></span>} html = "#{section_start_html}#{header}#{line_break}#{line}#{empty_line}#{section_end_html}" diff --git a/spec/lib/gitlab/git_access_spec.rb b/spec/lib/gitlab/git_access_spec.rb index 634c370d211..b9c21b3a7bd 100644 --- a/spec/lib/gitlab/git_access_spec.rb +++ b/spec/lib/gitlab/git_access_spec.rb @@ -831,7 +831,7 @@ describe Gitlab::GitAccess do push_master: true, push_protected_branch: false, push_remove_protected_branch: false, - push_tag: false, + push_tag: true, push_new_tag: true, push_all: false, merge_into_protected_branch: false |