From 19e1024bb874cdb9d912dd7de3cbc8f26daad048 Mon Sep 17 00:00:00 2001 From: Thong Kuah Date: Thu, 11 Oct 2018 12:15:04 +1300 Subject: Pass in project as kwarg for CreateService This enables us to have other options in the future such as passing in `group:`. Also, remove project arg from UpdateService, as un-used. This will help group cluster controller to re-use this services. --- spec/services/clusters/create_service_spec.rb | 2 +- spec/services/clusters/update_service_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'spec/services') diff --git a/spec/services/clusters/create_service_spec.rb b/spec/services/clusters/create_service_spec.rb index 1685dc748bd..3959295c13e 100644 --- a/spec/services/clusters/create_service_spec.rb +++ b/spec/services/clusters/create_service_spec.rb @@ -5,7 +5,7 @@ describe Clusters::CreateService do let(:project) { create(:project) } let(:user) { create(:user) } - subject { described_class.new(project, user, params).execute(access_token) } + subject { described_class.new(user, params).execute(project: project, access_token: access_token) } context 'when provider is gcp' do context 'when project has no clusters' do diff --git a/spec/services/clusters/update_service_spec.rb b/spec/services/clusters/update_service_spec.rb index 2d91a21035d..dcd75b6912d 100644 --- a/spec/services/clusters/update_service_spec.rb +++ b/spec/services/clusters/update_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' describe Clusters::UpdateService do describe '#execute' do - subject { described_class.new(cluster.project, cluster.user, params).execute(cluster) } + subject { described_class.new(cluster.user, params).execute(cluster) } let(:cluster) { create(:cluster, :project, :provided_by_user) } -- cgit v1.2.1