summaryrefslogtreecommitdiff
path: root/test/web/mastodon_api/account_view_test.exs
diff options
context:
space:
mode:
authorEgor <egor@kislitsyn.com>2019-04-22 07:20:43 +0000
committerkaniini <nenolod@gmail.com>2019-04-22 07:20:43 +0000
commitb9cdf6d3b9940fded7d6be9f8771fd9c211afdd4 (patch)
tree4cb4fc190215842d6a14c4a202ff2fda32cc223a /test/web/mastodon_api/account_view_test.exs
parent05862ded7a156ad6db16a70ec90045a2149da97d (diff)
downloadpleroma-b9cdf6d3b9940fded7d6be9f8771fd9c211afdd4.tar.gz
pleroma-b9cdf6d3b9940fded7d6be9f8771fd9c211afdd4.zip
Use `User.get_cached*` everywhere
Diffstat (limited to 'test/web/mastodon_api/account_view_test.exs')
-rw-r--r--test/web/mastodon_api/account_view_test.exs6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/web/mastodon_api/account_view_test.exs b/test/web/mastodon_api/account_view_test.exs
index d7487bed9..0730201bd 100644
--- a/test/web/mastodon_api/account_view_test.exs
+++ b/test/web/mastodon_api/account_view_test.exs
@@ -169,15 +169,15 @@ defmodule Pleroma.Web.MastodonAPI.AccountViewTest do
test "represent an embedded relationship" do
user =
insert(:user, %{
- info: %{note_count: 5, follower_count: 3, source_data: %{"type" => "Service"}},
+ info: %{note_count: 5, follower_count: 0, source_data: %{"type" => "Service"}},
nickname: "shp@shitposter.club",
inserted_at: ~N[2017-08-15 15:47:06.597036]
})
other_user = insert(:user)
-
{:ok, other_user} = User.follow(other_user, user)
{:ok, other_user} = User.block(other_user, user)
+ {:ok, _} = User.follow(insert(:user), user)
expected = %{
id: to_string(user.id),
@@ -186,7 +186,7 @@ defmodule Pleroma.Web.MastodonAPI.AccountViewTest do
display_name: user.name,
locked: false,
created_at: "2017-08-15T15:47:06.000Z",
- followers_count: 3,
+ followers_count: 1,
following_count: 0,
statuses_count: 5,
note: user.bio,