Merge remote-tracking branch 'pleroma/develop' into feature/disable-account
[akkoma] / test / support / factory.ex
index ea59912cfbab3ef755afd7f2dc0ba21501765c04..2a2954ad615ea0993b1479f3f81b6c697bfdc267 100644 (file)
@@ -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}"),