Commit 0715c3a7 authored by syasonik's avatar syasonik

Prevent daylight-savings-related failures in oncall specs

parent 554bf955
......@@ -6,7 +6,7 @@ RSpec.describe Resolvers::IncidentManagement::OncallShiftsResolver do
include GraphqlHelpers
let_it_be(:current_user) { create(:user) }
let_it_be(:rotation) { create(:incident_management_oncall_rotation, :with_participant) }
let_it_be(:rotation) { create(:incident_management_oncall_rotation, :with_participant, :utc) }
let_it_be(:project) { rotation.project }
let(:args) { { start_time: rotation.starts_at, end_time: rotation.starts_at + rotation.shift_cycle_duration } }
......
......@@ -7,7 +7,7 @@ RSpec.describe ::IncidentManagement::OncallShifts::ReadService do
let_it_be(:user_without_permissions) { create(:user) }
let_it_be(:current_user) { user_with_permissions }
let_it_be_with_refind(:rotation) { create(:incident_management_oncall_rotation, length: 1, length_unit: :days) }
let_it_be_with_refind(:rotation) { create(:incident_management_oncall_rotation, :utc, length: 1, length_unit: :days) }
let_it_be(:participant) { create(:incident_management_oncall_participant, :with_developer_access, rotation: rotation) }
let_it_be(:project) { rotation.project }
......
......@@ -59,6 +59,7 @@ RSpec.describe IncidentManagement::OncallRotations::PersistShiftsJob do
:incident_management_oncall_rotation,
:with_active_period, # 8:00 - 17:00
:with_participant,
:utc,
created_at: created_at, # Monday @ 5:00
starts_at: starts_at, # Tuesday @ 00:00
updated_at: updated_at # Friday @ 6:00
......@@ -174,6 +175,7 @@ RSpec.describe IncidentManagement::OncallRotations::PersistShiftsJob do
let_it_be_with_reload(:rotation) do
create(
:incident_management_oncall_rotation,
:utc,
:with_participant,
:with_active_period, # 8:00-17:00
starts_at: starts_at
......
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