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

devise.html.haml_spec.rb « layouts « views « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 9c31f4984fa74be558d2ecd0d1f277e43ba30940 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# frozen_string_literal: true

require 'spec_helper'

RSpec.describe 'layouts/devise', feature_category: :user_management do
  it_behaves_like 'a layout which reflects the application theme setting'
  it_behaves_like 'a layout which reflects the preferred language'

  describe 'logo' do
    it 'renders GitLab logo' do
      render

      expect(rendered).to have_selector('img[alt^="GitLab"]')
    end

    context 'with custom logo' do
      let_it_be(:appearance) { create(:appearance, logo: fixture_file_upload('spec/fixtures/dk.png')) }

      it 'renders custom logo' do
        render

        expect(rendered).to have_selector('img[data-src$="dk.png"]')
      end
    end
  end

  context 'without broadcast messaging' do
    it 'does not render the broadcast layout' do
      render

      expect(rendered).not_to render_template('layouts/_broadcast')
    end
  end
end