diff options
author | kaniini <nenolod@gmail.com> | 2019-01-17 19:27:15 +0000 |
---|---|---|
committer | kaniini <nenolod@gmail.com> | 2019-01-17 19:27:15 +0000 |
commit | 98d9dcd509ab6823e38b3ddbce1f5fc4f3d5a82c (patch) | |
tree | 5731bd6ab614b347224fe527744279c4f4c673f3 /test | |
parent | ae8a5942cf4da8a6046f5105ab9044f9faa164d6 (diff) | |
parent | 954dc4a4ad8a387ca7b18bb7d0ed32456491daec (diff) | |
download | pleroma-98d9dcd509ab6823e38b3ddbce1f5fc4f3d5a82c.tar.gz |
Merge branch '502_instance_stats_active_users_count_fix' into 'develop'
[#502] Fixed `user_count` in `/api/v1/instance` to include only active local users
Closes #502
See merge request pleroma/pleroma!678
Diffstat (limited to 'test')
-rw-r--r-- | test/web/mastodon_api/mastodon_api_controller_test.exs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/test/web/mastodon_api/mastodon_api_controller_test.exs b/test/web/mastodon_api/mastodon_api_controller_test.exs index c83bb5bc8..dd84052a3 100644 --- a/test/web/mastodon_api/mastodon_api_controller_test.exs +++ b/test/web/mastodon_api/mastodon_api_controller_test.exs @@ -1473,8 +1473,11 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIControllerTest do end test "get instance information", %{conn: conn} do - insert(:user, %{local: true}) user = insert(:user, %{local: true}) + + user2 = insert(:user, %{local: true}) + {:ok, _user2} = User.deactivate(user2, !user2.info.deactivated) + insert(:user, %{local: false, nickname: "u@peer1.com"}) insert(:user, %{local: false, nickname: "u@peer2.com"}) @@ -1489,7 +1492,7 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIControllerTest do stats = result["stats"] assert stats - assert stats["user_count"] == 2 + assert stats["user_count"] == 1 assert stats["status_count"] == 1 assert stats["domain_count"] == 2 end |