Fix Rubocop

This commit is contained in:
Kamil Trzcinski 2017-12-03 20:06:10 +01:00
parent 40f1859dc5
commit 90c09efe7e
4 changed files with 12 additions and 13 deletions

View File

@ -89,11 +89,11 @@ describe Projects::Clusters::GcpController do
stub_google_api_expired_token
end
it { expect(go).to redirect_to(gcp_login_namespace_project_clusters_path(project.namespace, project)) }
it { expect(go).to redirect_to(gcp_login_project_clusters_path(project)) }
end
context 'when access token is not stored in session' do
it { expect(go).to redirect_to(gcp_login_namespace_project_clusters_path(project.namespace, project)) }
it { expect(go).to redirect_to(gcp_login_project_clusters_path(project)) }
end
end
@ -156,13 +156,13 @@ describe Projects::Clusters::GcpController do
end
it 'redirects to login page' do
expect(go).to redirect_to(gcp_login_namespace_project_clusters_path(project.namespace, project))
expect(go).to redirect_to(gcp_login_project_clusters_path(project))
end
end
context 'when access token is not stored in session' do
it 'redirects to login page' do
expect(go).to redirect_to(gcp_login_namespace_project_clusters_path(project.namespace, project))
expect(go).to redirect_to(gcp_login_project_clusters_path(project))
end
end
end

View File

@ -58,7 +58,7 @@ describe Projects::Clusters::UserController do
project.add_master(user)
sign_in(user)
end
context 'when creates a cluster' do
it 'creates a new cluster' do
expect(ClusterProvisionWorker).to receive(:perform_async)

View File

@ -177,7 +177,7 @@ describe Projects::ClustersController do
context 'when changing parameters' do
let(:params) do
{
cluster: {
cluster: {
enabled: false,
name: 'my-new-cluster-name',
platform_kubernetes_attributes: {
@ -230,10 +230,9 @@ describe Projects::ClustersController do
end
def go
put :update, params.merge(
namespace_id: project.namespace,
project_id: project,
id: cluster)
put :update, params.merge(namespace_id: project.namespace,
project_id: project,
id: cluster)
end
end

View File

@ -18,7 +18,7 @@ feature 'Clusters Applications', :js do
context 'when cluster is being created' do
let(:cluster) { create(:cluster, :providing_by_gcp, projects: [project])}
scenario 'user is unable to install applications' do
page.within('.js-cluster-application-row-helm') do
expect(page.find(:css, '.js-cluster-application-install-button')['disabled']).to eq('true')
@ -29,7 +29,7 @@ feature 'Clusters Applications', :js do
context 'when cluster is created' do
let(:cluster) { create(:cluster, :provided_by_gcp, projects: [project])}
scenario 'user can install applications' do
page.within('.js-cluster-application-row-helm') do
expect(page.find(:css, '.js-cluster-application-install-button')['disabled']).to be_nil
@ -40,7 +40,7 @@ feature 'Clusters Applications', :js do
context 'when user installs Helm' do
before do
allow(ClusterInstallAppWorker).to receive(:perform_async).and_return(nil)
page.within('.js-cluster-application-row-helm') do
page.find(:css, '.js-cluster-application-install-button').click
end