summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2018-09-13 16:13:09 +0000
committerStan Hu <stanhu@gmail.com>2018-09-13 16:13:09 +0000
commit733cae702222771a734db5b3b5ab8fe3e2eb7538 (patch)
tree566a915d48d13039fcaed47bc2d54b8b8cda74c4
parentcdcd9da3ffacf24a48fc464df004a94c30ef59d8 (diff)
parentee57509dc852c558597cd807abd0391af82de379 (diff)
downloadgitlab-ce-733cae702222771a734db5b3b5ab8fe3e2eb7538.tar.gz
Merge branch 'dz-fix-jupyter-spec' into 'master'
Add project to jupyter cluster app factory spec See merge request gitlab-org/gitlab-ce!21717
-rw-r--r--spec/factories/clusters/applications/helm.rb2
-rw-r--r--spec/models/clusters/applications/jupyter_spec.rb6
2 files changed, 2 insertions, 6 deletions
diff --git a/spec/factories/clusters/applications/helm.rb b/spec/factories/clusters/applications/helm.rb
index 7c4a440b9a9..c13b0249d94 100644
--- a/spec/factories/clusters/applications/helm.rb
+++ b/spec/factories/clusters/applications/helm.rb
@@ -46,7 +46,7 @@ FactoryBot.define do
factory :clusters_applications_jupyter, class: Clusters::Applications::Jupyter do
oauth_application factory: :oauth_application
- cluster factory: %i(cluster with_installed_helm provided_by_gcp)
+ cluster factory: %i(cluster with_installed_helm provided_by_gcp project)
end
end
end
diff --git a/spec/models/clusters/applications/jupyter_spec.rb b/spec/models/clusters/applications/jupyter_spec.rb
index 44a64928e94..20e782113ff 100644
--- a/spec/models/clusters/applications/jupyter_spec.rb
+++ b/spec/models/clusters/applications/jupyter_spec.rb
@@ -114,11 +114,7 @@ describe Clusters::Applications::Jupyter do
end
context 'when cluster belongs to a project' do
- let(:project) { create(:project) }
-
- before do
- application.cluster.projects << project
- end
+ let(:project) { application.cluster.first_project }
it 'sets GitLab project id' do
expect(values).to match(/GITLAB_PROJECT_ID: '?#{project.id}/)