Welcome to mirror list, hosted at ThFree Co, Russian Federation.

_gitlab_version.html.haml_spec.rb « header « layouts « views « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 2f423c72ca6afa2862d9d74d141302a89e5a8385 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# frozen_string_literal: true

require 'spec_helper'

RSpec.describe 'layouts/header/_gitlab_version' do
  describe 'when show_version_check? is true' do
    before do
      allow(view).to receive(:show_version_check?).and_return(true)
      render
    end

    it 'renders the version check badge' do
      expect(rendered).to have_selector('.js-gitlab-version-check')
    end

    it 'renders the container as a link' do
      expect(rendered).to have_selector(
        'a[data-testid="gitlab-version-container"][href="/help/update/index"]'
      )
    end
  end
end