summaryrefslogtreecommitdiff
path: root/test/conversation
diff options
context:
space:
mode:
authorkaniini <ariadne@dereferenced.org>2019-10-05 19:28:07 +0000
committerkaniini <ariadne@dereferenced.org>2019-10-05 19:28:07 +0000
commit17ff4b43cb75334e6a6845a7d7ec9c88285a339d (patch)
tree44c9f86abc9d5eda51ccbe001c6f48779cf41cad /test/conversation
parent0ee6100c8d7d21eb0c7cdd1c098a5071c0b9682f (diff)
parent8249924485965148f3a690c5d76e5f8b3bd78940 (diff)
downloadpleroma-17ff4b43cb75334e6a6845a7d7ec9c88285a339d.tar.gz
pleroma-17ff4b43cb75334e6a6845a7d7ec9c88285a339d.zip
Merge branch 'unread-conversation-count' into 'develop'
Add `pleroma.unread_conversation_count` to the Account entity See merge request pleroma/pleroma!1796
Diffstat (limited to 'test/conversation')
-rw-r--r--test/conversation/participation_test.exs4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/conversation/participation_test.exs b/test/conversation/participation_test.exs
index a27167d42..f430bdf75 100644
--- a/test/conversation/participation_test.exs
+++ b/test/conversation/participation_test.exs
@@ -6,6 +6,7 @@ defmodule Pleroma.Conversation.ParticipationTest do
use Pleroma.DataCase
import Pleroma.Factory
alias Pleroma.Conversation.Participation
+ alias Pleroma.User
alias Pleroma.Web.CommonAPI
test "getting a participation will also preload things" do
@@ -30,6 +31,8 @@ defmodule Pleroma.Conversation.ParticipationTest do
{:ok, activity} =
CommonAPI.post(user, %{"status" => "Hey @#{other_user.nickname}.", "visibility" => "direct"})
+ user = User.get_cached_by_id(user.id)
+ other_user = User.get_cached_by_id(user.id)
[participation] = Participation.for_user(user)
participation = Pleroma.Repo.preload(participation, :recipients)
@@ -155,6 +158,7 @@ defmodule Pleroma.Conversation.ParticipationTest do
[participation] = Participation.for_user_with_last_activity_id(user)
participation = Repo.preload(participation, :recipients)
+ user = User.get_cached_by_id(user.id)
assert participation.recipients |> length() == 1
assert user in participation.recipients