Switch to Jason over Poison
[akkoma] / test / support / factory.ex
index af38be46c68bedb31ac98f1ef7a03aec14e4f134..2a2954ad615ea0993b1479f3f81b6c697bfdc267 100644 (file)
@@ -5,6 +5,17 @@
 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}")