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:
Diffstat (limited to 'spec/models/clusters/applications/prometheus_spec.rb')
-rw-r--r--spec/models/clusters/applications/prometheus_spec.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/models/clusters/applications/prometheus_spec.rb b/spec/models/clusters/applications/prometheus_spec.rb
index ce341e67c14..1ed9e207b6b 100644
--- a/spec/models/clusters/applications/prometheus_spec.rb
+++ b/spec/models/clusters/applications/prometheus_spec.rb
@@ -47,7 +47,7 @@ describe Clusters::Applications::Prometheus do
it 'sets last_update_started_at to now' do
Timecop.freeze do
- expect { subject.make_updating }.to change { subject.reload.last_update_started_at }.to be_within(1.second).of(Time.now)
+ expect { subject.make_updating }.to change { subject.reload.last_update_started_at }.to be_within(1.second).of(Time.current)
end
end
end
@@ -347,14 +347,14 @@ describe Clusters::Applications::Prometheus do
describe '#updated_since?' do
let(:cluster) { create(:cluster) }
let(:prometheus_app) { build(:clusters_applications_prometheus, cluster: cluster) }
- let(:timestamp) { Time.now - 5.minutes }
+ let(:timestamp) { Time.current - 5.minutes }
around do |example|
Timecop.freeze { example.run }
end
before do
- prometheus_app.last_update_started_at = Time.now
+ prometheus_app.last_update_started_at = Time.current
end
context 'when app does not have status failed' do
@@ -363,7 +363,7 @@ describe Clusters::Applications::Prometheus do
end
it 'returns false when last update started before the timestamp' do
- expect(prometheus_app.updated_since?(Time.now + 5.minutes)).to be false
+ expect(prometheus_app.updated_since?(Time.current + 5.minutes)).to be false
end
end