diff options
Diffstat (limited to 'test/support')
-rw-r--r-- | test/support/factory.ex | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/support/factory.ex b/test/support/factory.ex index 0840f31ec..08975743f 100644 --- a/test/support/factory.ex +++ b/test/support/factory.ex @@ -5,6 +5,23 @@ defmodule Pleroma.Factory do use ExMachina.Ecto, repo: Pleroma.Repo + def participation_factory do + conversation = insert(:conversation) + user = insert(:user) + + %Pleroma.Conversation.Participation{ + conversation: conversation, + user: user, + read: false + } + end + + def conversation_factory do + %Pleroma.Conversation{ + ap_id: sequence(:ap_id, &"https://some_conversation/#{&1}") + } + end + def user_factory do user = %Pleroma.User{ name: sequence(:name, &"Test ใในใ User #{&1}"), |