diff options
Diffstat (limited to 'spec/services/clusters/applications/schedule_update_service_spec.rb')
-rw-r--r-- | spec/services/clusters/applications/schedule_update_service_spec.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/services/clusters/applications/schedule_update_service_spec.rb b/spec/services/clusters/applications/schedule_update_service_spec.rb index 0764f5b6a97..eb1006ce8e0 100644 --- a/spec/services/clusters/applications/schedule_update_service_spec.rb +++ b/spec/services/clusters/applications/schedule_update_service_spec.rb @@ -13,10 +13,10 @@ describe Clusters::Applications::ScheduleUpdateService do context 'when application is able to be updated' do context 'when the application was recently scheduled' do it 'schedules worker with a backoff delay' do - application = create(:clusters_applications_prometheus, :installed, last_update_started_at: Time.now + 5.minutes) + application = create(:clusters_applications_prometheus, :installed, last_update_started_at: Time.current + 5.minutes) service = described_class.new(application, project) - expect(::ClusterUpdateAppWorker).to receive(:perform_in).with(described_class::BACKOFF_DELAY, application.name, application.id, project.id, Time.now).once + expect(::ClusterUpdateAppWorker).to receive(:perform_in).with(described_class::BACKOFF_DELAY, application.name, application.id, project.id, Time.current).once service.execute end @@ -27,7 +27,7 @@ describe Clusters::Applications::ScheduleUpdateService do application = create(:clusters_applications_prometheus, :installed) service = described_class.new(application, project) - expect(::ClusterUpdateAppWorker).to receive(:perform_async).with(application.name, application.id, project.id, Time.now).once + expect(::ClusterUpdateAppWorker).to receive(:perform_async).with(application.name, application.id, project.id, Time.current).once service.execute end |