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

index.html.haml_spec.rb « services « admin « views « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: e8cd2dde67e2148fc5ef2e893eefea91a7330c8b (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
# frozen_string_literal: true

require 'spec_helper'

RSpec.describe 'admin/services/index.html.haml' do
  before do
    assign(:services, build_stubbed_list(:service, 1))
    assign(:existing_instance_types, [])
  end

  context 'user has not dismissed Service Templates deprecation message' do
    it 'shows the message' do
      allow(view).to receive(:show_service_templates_deprecated?).and_return(true)

      render

      expect(rendered).to have_content('Service Templates will soon be deprecated.')
    end
  end

  context 'user has dismissed Service Templates deprecation message' do
    it 'does not show the message' do
      allow(view).to receive(:show_service_templates_deprecated?).and_return(false)

      render

      expect(rendered).not_to have_content('Service Templates will soon be deprecated.')
    end
  end
end