23 lines
675 B
Elixir
23 lines
675 B
Elixir
|
# Pleroma: A lightweight social networking server
|
||
|
# Copyright © 2017-2019 Pleroma Authors <https://pleroma.social/>
|
||
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||
|
|
||
|
defmodule Pleroma.Conversation.ParticipationTest do
|
||
|
use Pleroma.DataCase
|
||
|
|
||
|
import Pleroma.Factory
|
||
|
|
||
|
alias Pleroma.Conversation.Participation
|
||
|
|
||
|
test "it creates a participation for a conversation and a user" do
|
||
|
user = insert(:user)
|
||
|
conversation = insert(:conversation)
|
||
|
|
||
|
{:ok, %Participation{} = participation} =
|
||
|
Participation.create_for_user_and_conversation(user, conversation)
|
||
|
|
||
|
assert participation.user_id == user.id
|
||
|
assert participation.conversation_id == conversation.id
|
||
|
end
|
||
|
end
|