test: Fix Mobilizon.Service.Notifications.SchedulerTest tests
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
52c4337c4f
commit
ddba7d6fc5
|
@ -71,7 +71,9 @@ defmodule Mobilizon.Service.Notifications.SchedulerTest do
|
||||||
assert_enqueued(
|
assert_enqueued(
|
||||||
worker: Notification,
|
worker: Notification,
|
||||||
args: %{user_id: user_id, op: :on_day_notification},
|
args: %{user_id: user_id, op: :on_day_notification},
|
||||||
scheduled_at: %{DateTime.shift_zone!(begins_on, settings.timezone) | hour: 8}
|
scheduled_at:
|
||||||
|
%{DateTime.shift_zone!(begins_on, settings.timezone) | hour: 8}
|
||||||
|
|> DateTime.shift_zone!("Etc/UTC")
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -131,7 +133,9 @@ defmodule Mobilizon.Service.Notifications.SchedulerTest do
|
||||||
assert_enqueued(
|
assert_enqueued(
|
||||||
worker: Notification,
|
worker: Notification,
|
||||||
args: %{user_id: user_id, op: :on_day_notification},
|
args: %{user_id: user_id, op: :on_day_notification},
|
||||||
scheduled_at: %{DateTime.shift_zone!(begins_on, settings.timezone) | hour: 8}
|
scheduled_at:
|
||||||
|
%{DateTime.shift_zone!(begins_on, settings.timezone) | hour: 8}
|
||||||
|
|> DateTime.shift_zone!("Etc/UTC")
|
||||||
)
|
)
|
||||||
|
|
||||||
%DateTime{} = tomorrow = DateTime.utc_now() |> DateTime.add(3600 * 24)
|
%DateTime{} = tomorrow = DateTime.utc_now() |> DateTime.add(3600 * 24)
|
||||||
|
@ -177,7 +181,7 @@ defmodule Mobilizon.Service.Notifications.SchedulerTest do
|
||||||
assert_enqueued(
|
assert_enqueued(
|
||||||
worker: Notification,
|
worker: Notification,
|
||||||
args: %{user_id: user_id, op: :weekly_notification},
|
args: %{user_id: user_id, op: :weekly_notification},
|
||||||
scheduled_at: scheduled_at
|
scheduled_at: DateTime.shift_zone!(scheduled_at, "Etc/UTC")
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -360,7 +364,7 @@ defmodule Mobilizon.Service.Notifications.SchedulerTest do
|
||||||
assert_enqueued(
|
assert_enqueued(
|
||||||
worker: Notification,
|
worker: Notification,
|
||||||
args: %{user_id: user_id, event_id: event.id, op: :pending_participation_notification},
|
args: %{user_id: user_id, event_id: event.id, op: :pending_participation_notification},
|
||||||
scheduled_at: scheduled_at
|
scheduled_at: DateTime.shift_zone!(scheduled_at, "Etc/UTC")
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue