Commit 9ea03646 authored by Sean Arnold's avatar Sean Arnold

Fix Time.new calls

parent 3970e19f
...@@ -14,7 +14,7 @@ describe EE::AuditEvents::BulkInsertService do ...@@ -14,7 +14,7 @@ describe EE::AuditEvents::BulkInsertService do
EE::AuditEvents::RepositoryPushAuditEventService.new(user, entity, target_ref, from, to) EE::AuditEvents::RepositoryPushAuditEventService.new(user, entity, target_ref, from, to)
end end
end end
let(:timestamp) { Time.new.in_time_zone(2019, 10, 10) } let(:timestamp) { Time.zone.local(2019, 10, 10) }
let(:attrs) do let(:attrs) do
{ {
author_id: user.id, author_id: user.id,
......
...@@ -12,7 +12,7 @@ describe EE::AuditEvents::RepositoryPushAuditEventService do ...@@ -12,7 +12,7 @@ describe EE::AuditEvents::RepositoryPushAuditEventService do
let(:service) { described_class.new(user, entity, target_ref, from, to) } let(:service) { described_class.new(user, entity, target_ref, from, to) }
describe '#attributes' do describe '#attributes' do
let(:timestamp) { Time.new.in_time_zone(2019, 10, 10) } let(:timestamp) { Time.zone.local(2019, 10, 10) }
let(:attrs) do let(:attrs) do
{ {
author_id: user.id, author_id: user.id,
......
...@@ -571,7 +571,7 @@ module Ci ...@@ -571,7 +571,7 @@ module Ci
end end
describe '#register_success' do describe '#register_success' do
let!(:current_time) { Time.new.in_time_zone(2018, 4, 5, 14, 0, 0) } let!(:current_time) { Time.zone.local(2018, 4, 5, 14, 0, 0) }
let!(:attempt_counter) { double('Gitlab::Metrics::NullMetric') } let!(:attempt_counter) { double('Gitlab::Metrics::NullMetric') }
let!(:job_queue_duration_seconds) { double('Gitlab::Metrics::NullMetric') } let!(:job_queue_duration_seconds) { double('Gitlab::Metrics::NullMetric') }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment