2019-10-17 06:07:30 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-10-04 15:43:45 +00:00
|
|
|
require 'spec_helper'
|
|
|
|
|
2020-06-16 18:09:01 +00:00
|
|
|
RSpec.describe Projects::ClustersController, '(JavaScript fixtures)', type: :controller do
|
2017-10-04 15:43:45 +00:00
|
|
|
include JavaScriptFixturesHelpers
|
|
|
|
|
|
|
|
let(:namespace) { create(:namespace, name: 'frontend-fixtures' )}
|
|
|
|
let(:project) { create(:project, :repository, namespace: namespace) }
|
2017-11-03 08:22:49 +00:00
|
|
|
let(:cluster) { create(:cluster, :provided_by_gcp, projects: [project]) }
|
2020-12-07 12:10:00 +00:00
|
|
|
let(:user) { project.owner }
|
2017-10-04 15:43:45 +00:00
|
|
|
|
|
|
|
render_views
|
|
|
|
|
|
|
|
before do
|
2020-12-07 12:10:00 +00:00
|
|
|
sign_in(user)
|
2017-10-04 15:43:45 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
after do
|
|
|
|
remove_repository(project)
|
|
|
|
end
|
|
|
|
|
2019-04-21 10:58:07 +00:00
|
|
|
it 'clusters/show_cluster.html' do
|
2018-12-19 19:50:20 +00:00
|
|
|
get :show, params: {
|
2017-10-04 15:43:45 +00:00
|
|
|
namespace_id: project.namespace.to_param,
|
|
|
|
project_id: project,
|
|
|
|
id: cluster
|
2018-12-19 19:50:20 +00:00
|
|
|
}
|
2017-10-04 15:43:45 +00:00
|
|
|
|
2019-07-17 22:15:53 +00:00
|
|
|
expect(response).to be_successful
|
2017-10-04 15:43:45 +00:00
|
|
|
end
|
|
|
|
end
|