Fix tests

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2021-06-03 17:17:13 +02:00
parent c0ab3d9905
commit d3164899f3
10 changed files with 224 additions and 24 deletions

View File

@@ -418,11 +418,34 @@ defmodule Mobilizon.Factory do
%Mobilizon.Activities.Activity{
type: :event,
subject: :event_created,
subject_params: %{event_title: event.title},
subject_params: %{
"event_title" => event.title,
"event_uuid" => event.uuid,
"event_id" => event.id
},
author: actor,
group: group,
object_type: :event,
object_id: to_string(event.id)
}
end
def mobilizon_activity_setting_factory do
%Mobilizon.Users.ActivitySetting{
key: "event_created",
method: "email",
enabled: true,
user: build(:user)
}
end
def push_subscription_factory do
%Mobilizon.Users.PushSubscription{
digest: "",
endpoint: "",
auth: "",
p256dh: "",
user: build(:user)
}
end
end