summaryrefslogtreecommitdiff
path: root/spec/views/shared/gitlab_version/_security_patch_upgrade_alert.html.haml_spec.rb
blob: 4387a3f5b0782807ac7be0626c24f0088147a365 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# frozen_string_literal: true

require 'spec_helper'

RSpec.describe 'shared/gitlab_version/_security_patch_upgrade_alert' do
  describe 'when show_security_patch_upgrade_alert? is true' do
    before do
      allow(view).to receive(:show_security_patch_upgrade_alert?).and_return(true)
      render
    end

    it 'renders the security patch upgrade alert' do
      expect(rendered).to have_selector('#js-security-patch-upgrade-alert')
    end

    it 'renders the security patch upgrade alert modal' do
      expect(rendered).to have_selector('#js-security-patch-upgrade-alert-modal')
    end
  end
end