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:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-12-10 10:53:40 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-12-10 10:53:40 +0300
commitcfc792b9ca064990e6540cb742e80529ea669a81 (patch)
tree147cd4256319990cebbc02fe8e4fbbbe06f5720a /spec/services/deployments
parent93c6764dacd4c605027ef1cd367d3aebe420b223 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/services/deployments')
-rw-r--r--spec/services/deployments/after_create_service_spec.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/services/deployments/after_create_service_spec.rb b/spec/services/deployments/after_create_service_spec.rb
index 94532ed81ae..4ca96658db0 100644
--- a/spec/services/deployments/after_create_service_spec.rb
+++ b/spec/services/deployments/after_create_service_spec.rb
@@ -115,6 +115,21 @@ describe Deployments::AfterCreateService do
expect(subject.environment.external_url).to eq('http://master.review-apps.gitlab.com')
end
end
+
+ context 'when auto_stop_in are used' do
+ let(:options) do
+ { name: 'production', auto_stop_in: '1 day' }
+ end
+
+ it 'renews auto stop at' do
+ Timecop.freeze do
+ environment.update!(auto_stop_at: nil)
+
+ expect { subject.execute }
+ .to change { environment.reset.auto_stop_at&.round }.from(nil).to(1.day.since.round)
+ end
+ end
+ end
end
describe '#expanded_environment_url' do