2017-10-04 11:43:45 -04:00
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
describe Projects::ClustersController, '(JavaScript fixtures)', type: :controller do
|
|
|
|
include JavaScriptFixturesHelpers
|
|
|
|
|
|
|
|
let(:admin) { create(:admin) }
|
|
|
|
let(:namespace) { create(:namespace, name: 'frontend-fixtures' )}
|
|
|
|
let(:project) { create(:project, :repository, namespace: namespace) }
|
2017-11-03 04:22:49 -04:00
|
|
|
let(:cluster) { create(:cluster, :provided_by_gcp, projects: [project]) }
|
2017-10-04 11:43:45 -04:00
|
|
|
|
|
|
|
render_views
|
|
|
|
|
|
|
|
before(:all) do
|
2017-10-06 07:16:08 -04:00
|
|
|
clean_frontend_fixtures('clusters/')
|
2017-10-04 11:43:45 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
before do
|
|
|
|
sign_in(admin)
|
|
|
|
end
|
|
|
|
|
|
|
|
after do
|
|
|
|
remove_repository(project)
|
|
|
|
end
|
|
|
|
|
2019-04-21 06:58:07 -04:00
|
|
|
it 'clusters/show_cluster.html' do
|
2018-12-19 14:50:20 -05:00
|
|
|
get :show, params: {
|
2017-10-04 11:43:45 -04:00
|
|
|
namespace_id: project.namespace.to_param,
|
|
|
|
project_id: project,
|
|
|
|
id: cluster
|
2018-12-19 14:50:20 -05:00
|
|
|
}
|
2017-10-04 11:43:45 -04:00
|
|
|
|
|
|
|
expect(response).to be_success
|
|
|
|
end
|
|
|
|
end
|