diff options
| author | href <href@random.sh> | 2017-12-05 14:12:15 +0100 |
|---|---|---|
| committer | href <href@random.sh> | 2017-12-05 14:12:15 +0100 |
| commit | 72f7baa6548dbd5cc5ae4c37d9c2e53126203449 (patch) | |
| tree | a4923155f8740e8570be4400785a72d8cd6e6bbc /test/web/mastodon_api/mastodon_api_controller_test.exs | |
| parent | 1cb5cbdc6c1cd065e90961a9d538cb72610ae481 (diff) | |
| parent | 08e7e249b1e656bce79fec7df4ce8bf9b158855f (diff) | |
| download | pleroma-72f7baa6548dbd5cc5ae4c37d9c2e53126203449.tar.gz pleroma-72f7baa6548dbd5cc5ae4c37d9c2e53126203449.zip | |
Merge remote-tracking branch 'upstream/develop' into media-proxy
Diffstat (limited to 'test/web/mastodon_api/mastodon_api_controller_test.exs')
| -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 |
