diff options
author | lambda <lain@soykaf.club> | 2019-05-07 14:43:21 +0000 |
---|---|---|
committer | lambda <lain@soykaf.club> | 2019-05-07 14:43:21 +0000 |
commit | 238dd72fad2452a8da594e68b8e6c80d709587e8 (patch) | |
tree | 050a8e55ae39047e197b0e84c9fed8bacaf91545 /test/support | |
parent | 6518644db1d31f2b30b95fa0899b3751bc330d56 (diff) | |
parent | c42ded13a2caa02f3f5aa00accce69b183546f9e (diff) | |
download | pleroma-238dd72fad2452a8da594e68b8e6c80d709587e8.tar.gz |
Merge branch 'conversations_three' into 'develop'
Conversations once more.
See merge request pleroma/pleroma!1119
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 ea59912cf..2a2954ad6 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}"), |