test: fix tests

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2023-11-21 17:29:58 +01:00
parent f47889b5e0
commit c731f0f084
4 changed files with 20 additions and 19 deletions

View File

@@ -187,17 +187,18 @@ defmodule Mobilizon.Service.Workers.LegacyNotifierBuilderTest do
"object_id" => to_string(comment_id)
})
NotifierMock
|> expect(:ready?, fn -> true end)
|> expect(:send, fn %User{},
%Activity{
type: :comment,
subject: :participation_event_comment,
object_type: :comment
},
[single_activity: true] ->
{:ok, :sent}
end)
# # Disabled as announcement is sent straight away
# NotifierMock
# |> expect(:ready?, fn -> true end)
# |> expect(:send, fn %User{},
# %Activity{
# type: :comment,
# subject: :participation_event_comment,
# object_type: :comment
# },
# [single_activity: true] ->
# {:ok, :sent}
# end)
assert :ok == LegacyNotifierBuilder.perform(%Oban.Job{args: args})
end