diff options
| author | Lain Iwakura <lain@soykaf.club> | 2017-11-30 14:59:44 +0100 | 
|---|---|---|
| committer | Lain Iwakura <lain@soykaf.club> | 2017-11-30 14:59:44 +0100 | 
| commit | 5637d163e6eb365c69f0e79e43306156241f6494 (patch) | |
| tree | 3a1988857ef2d3ad48f01633f0ba6bbcd5756082 /test/web/mastodon_api | |
| parent | 9d1c0ec18dcf407bbac14868f64e98e1ec499c34 (diff) | |
| download | pleroma-5637d163e6eb365c69f0e79e43306156241f6494.tar.gz pleroma-5637d163e6eb365c69f0e79e43306156241f6494.zip | |
MastodonAPI: Add proper user count.
Diffstat (limited to 'test/web/mastodon_api')
| -rw-r--r-- | test/web/mastodon_api/mastodon_api_controller_test.exs | 15 | 
1 files changed, 15 insertions, 0 deletions
| diff --git a/test/web/mastodon_api/mastodon_api_controller_test.exs b/test/web/mastodon_api/mastodon_api_controller_test.exs index c8b929501..fc0010569 100644 --- a/test/web/mastodon_api/mastodon_api_controller_test.exs +++ b/test/web/mastodon_api/mastodon_api_controller_test.exs @@ -573,4 +573,19 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIControllerTest do        assert user["header"] != "https://placehold.it/700x335"      end    end + +  test "get instance information" do +    insert(:user, %{local: true}) +    user = insert(:user, %{local: true}) +    insert(:user, %{local: false}) + +    {:ok, _} = TwitterAPI.create_status(user, %{"status" => "cofe"}) + +    conn = conn +    |> get("/api/v1/instance") + +    assert result = json_response(conn, 200) + +    assert result["stats"]["user_count"] == 2 +  end  end | 
