Streamer: Stream out Conversations/Participations.
This commit is contained in:
parent
8af55728e4
commit
81d1aa424d
7 changed files with 98 additions and 7 deletions
|
|
@ -117,4 +117,21 @@ defmodule Pleroma.ConversationTest do
|
|||
tridi.id == user_id
|
||||
end)
|
||||
end
|
||||
|
||||
test "create_or_bump_for returns the conversation with participations" do
|
||||
har = insert(:user)
|
||||
jafnhar = insert(:user, local: false)
|
||||
|
||||
{:ok, activity} =
|
||||
CommonAPI.post(har, %{"status" => "Hey @#{jafnhar.nickname}", "visibility" => "direct"})
|
||||
|
||||
{:ok, conversation} = Conversation.create_or_bump_for(activity)
|
||||
|
||||
assert length(conversation.participations) == 2
|
||||
|
||||
{:ok, activity} =
|
||||
CommonAPI.post(har, %{"status" => "Hey @#{jafnhar.nickname}", "visibility" => "public"})
|
||||
|
||||
assert {:error, _} = Conversation.create_or_bump_for(activity)
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue