prometheus_service.rb 880 Bytes
Newer Older
1 2 3 4 5 6 7 8 9
require 'spec_helper'

describe Projects::ServicesController, '(JavaScript fixtures)', type: :controller do
  include JavaScriptFixturesHelpers

  let(:admin)     { create(:admin) }
  let(:namespace) { create(:namespace, name: 'frontend-fixtures' )}
  let(:project)   { create(:project_empty_repo, namespace: namespace, path: 'services-project') }
  let!(:service)  { create(:prometheus_service, project: project) }
10

11 12 13
  render_views

  before(:all) do
14
    clean_frontend_fixtures('services/prometheus')
15 16
  end

17
  before do
18 19 20
    sign_in(admin)
  end

21 22 23 24
  after do
    remove_repository(project)
  end

25
  it 'services/prometheus/prometheus_service.html' do |example|
26
    get :edit, params: {
27 28 29
      namespace_id: namespace,
      project_id: project,
      id: service.to_param
30
    }
31 32 33 34 35

    expect(response).to be_success
    store_frontend_fixture(response, example.description)
  end
end