Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShinya Maeda <shinya@gitlab.com>2017-11-27 21:06:38 +0300
committerShinya Maeda <shinya@gitlab.com>2017-11-28 14:47:59 +0300
commit7277b3b32c2afd26a033ecf81b93319efb65861d (patch)
tree1529b1681fd8fc35254ce4a13baf56200067ec69 /spec/features/auto_deploy_spec.rb
parentb4c4e1bd6ea3c8c12540d50f0bf11e04d72d114b (diff)
Fix feature spec
Diffstat (limited to 'spec/features/auto_deploy_spec.rb')
-rw-r--r--spec/features/auto_deploy_spec.rb10
1 files changed, 8 insertions, 2 deletions
diff --git a/spec/features/auto_deploy_spec.rb b/spec/features/auto_deploy_spec.rb
index 453b31e0d77..7a395f62511 100644
--- a/spec/features/auto_deploy_spec.rb
+++ b/spec/features/auto_deploy_spec.rb
@@ -7,7 +7,7 @@ describe 'Auto deploy' do
shared_examples 'same behavior between KubernetesService and Platform::Kubernetes' do
context 'when no deployment service is active' do
before do
- project.kubernetes_service.update!(active: false)
+ trun_off
end
it 'does not show a button to set up auto deploy' do
@@ -18,7 +18,7 @@ describe 'Auto deploy' do
context 'when a deployment service is active' do
before do
- project.kubernetes_service.update!(active: true)
+ trun_on
visit project_path(project)
end
@@ -56,6 +56,9 @@ describe 'Auto deploy' do
sign_in user
end
+ let(:trun_on) { project.deployment_platform.update!(active: true) }
+ let(:trun_off) { project.deployment_platform.update!(active: false) }
+
it_behaves_like 'same behavior between KubernetesService and Platform::Kubernetes'
end
@@ -66,6 +69,9 @@ describe 'Auto deploy' do
sign_in user
end
+ let(:trun_on) { project.deployment_platform.cluster.update!(enabled: true) }
+ let(:trun_off) { project.deployment_platform.cluster.update!(enabled: false) }
+
it_behaves_like 'same behavior between KubernetesService and Platform::Kubernetes'
end
end