2017-05-31 11:40:30 +00:00
|
|
|
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) }
|
|
|
|
|
|
|
|
render_views
|
|
|
|
|
|
|
|
before(:all) do
|
2017-06-16 16:26:40 +00:00
|
|
|
clean_frontend_fixtures('services/prometheus')
|
2017-05-31 11:40:30 +00:00
|
|
|
end
|
|
|
|
|
2017-08-10 22:31:42 +00:00
|
|
|
before do
|
2017-05-31 11:40:30 +00:00
|
|
|
sign_in(admin)
|
|
|
|
end
|
|
|
|
|
2017-06-16 16:26:40 +00:00
|
|
|
it 'services/prometheus/prometheus_service.html.raw' do |example|
|
2017-05-31 11:40:30 +00:00
|
|
|
get :edit,
|
|
|
|
namespace_id: namespace,
|
|
|
|
project_id: project,
|
|
|
|
id: service.to_param
|
|
|
|
|
|
|
|
expect(response).to be_success
|
|
|
|
store_frontend_fixture(response, example.description)
|
|
|
|
end
|
|
|
|
end
|