summaryrefslogtreecommitdiff
path: root/spec/services
diff options
context:
space:
mode:
authorThong Kuah <tkuah@gitlab.com>2018-10-11 12:15:04 +1300
committerThong Kuah <tkuah@gitlab.com>2018-10-15 11:01:09 +1300
commit19e1024bb874cdb9d912dd7de3cbc8f26daad048 (patch)
tree74f7891ef2134feee46837af5866ff75e5b2373b /spec/services
parentda4f77957ccff7cdf22110ef56a4286bbc5a7749 (diff)
downloadgitlab-ce-19e1024bb874cdb9d912dd7de3cbc8f26daad048.tar.gz
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.
Diffstat (limited to 'spec/services')
-rw-r--r--spec/services/clusters/create_service_spec.rb2
-rw-r--r--spec/services/clusters/update_service_spec.rb2
2 files changed, 2 insertions, 2 deletions
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) }