diff options
| author | Maksim Pechnikov <parallel588@gmail.com> | 2019-11-28 21:26:56 +0300 |
|---|---|---|
| committer | Maksim Pechnikov <parallel588@gmail.com> | 2019-11-28 21:27:01 +0300 |
| commit | b7c449118bc09ab36610e85292d153ace67c2b89 (patch) | |
| tree | 1b00c2dec9d233ec3aaefd699aee3f4080f68119 /test/web/mastodon_api | |
| parent | 1403a1441de36e8a58da5e996c208a9c10f65440 (diff) | |
| parent | ca1acfa314a57f78c2f5f8e60a4bd1380350e483 (diff) | |
| download | pleroma-b7c449118bc09ab36610e85292d153ace67c2b89.tar.gz pleroma-b7c449118bc09ab36610e85292d153ace67c2b89.zip | |
Merge branch 'develop' into issue/1383
Diffstat (limited to 'test/web/mastodon_api')
| -rw-r--r-- | test/web/mastodon_api/views/account_view_test.exs | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/test/web/mastodon_api/views/account_view_test.exs b/test/web/mastodon_api/views/account_view_test.exs index af88841ed..d147079ab 100644 --- a/test/web/mastodon_api/views/account_view_test.exs +++ b/test/web/mastodon_api/views/account_view_test.exs @@ -350,7 +350,8 @@ defmodule Pleroma.Web.MastodonAPI.AccountViewTest do } } - assert expected == AccountView.render("show.json", %{user: user, for: other_user}) + assert expected == + AccountView.render("show.json", %{user: refresh_record(user), for: other_user}) end test "returns the settings store if the requesting user is the represented user and it's requested specifically" do @@ -374,6 +375,14 @@ defmodule Pleroma.Web.MastodonAPI.AccountViewTest do refute result.display_name == "<marquee> username </marquee>" end + test "never display nil user follow counts" do + user = insert(:user, following_count: 0, follower_count: 0) + result = AccountView.render("show.json", %{user: user}) + + assert result.following_count == 0 + assert result.followers_count == 0 + end + describe "hiding follows/following" do test "shows when follows/followers stats are hidden and sets follow/follower count to 0" do user = |
