diff options
| author | Ivan Tashkinov <ivantashkinov@gmail.com> | 2019-11-29 10:17:59 +0300 |
|---|---|---|
| committer | Ivan Tashkinov <ivantashkinov@gmail.com> | 2019-11-29 10:17:59 +0300 |
| commit | 52cc7de82cf3aa637d599edc357909be8c9366eb (patch) | |
| tree | 3331c84530c0d93c41171f83c6270c8d499f5195 /test/web/mastodon_api | |
| parent | c8d3c3bfeca66d16846f97b50328e0718cfe5fef (diff) | |
| parent | d7b40dd4ba5bf3890be8a8b69d5aff84f5ffc5d2 (diff) | |
| download | pleroma-52cc7de82cf3aa637d599edc357909be8c9366eb.tar.gz pleroma-52cc7de82cf3aa637d599edc357909be8c9366eb.zip | |
Merge remote-tracking branch 'remotes/upstream/develop' into 1335-user-api-id-fields-relations
# Conflicts:
# mix.lock
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 53cd26a69..a8edbac70 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 = |
