diff options
author | kaniini <nenolod@gmail.com> | 2019-03-11 21:43:46 +0000 |
---|---|---|
committer | kaniini <nenolod@gmail.com> | 2019-03-11 21:43:46 +0000 |
commit | 4aa285e6ceb79ca8995ea9ff3585ea79e787650c (patch) | |
tree | 99e3d686b2ecc64ffc4f3802f78f6bfa690ac716 /test/web | |
parent | f9a9639015b1ca50096bd7f7cedea3c77bd6ffe2 (diff) | |
parent | 3474066f6dc98003583dcd8537028b515be0e126 (diff) | |
download | pleroma-4aa285e6ceb79ca8995ea9ff3585ea79e787650c.tar.gz |
Merge branch 'add-screenname-extension-to-masto-api' into 'develop'
MastoAPI Accounts: Add fetching by nickname.
See merge request pleroma/pleroma!922
Diffstat (limited to 'test/web')
-rw-r--r-- | test/web/mastodon_api/mastodon_api_controller_test.exs | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/test/web/mastodon_api/mastodon_api_controller_test.exs b/test/web/mastodon_api/mastodon_api_controller_test.exs index 8a20eef2c..8e14e03c8 100644 --- a/test/web/mastodon_api/mastodon_api_controller_test.exs +++ b/test/web/mastodon_api/mastodon_api_controller_test.exs @@ -1064,6 +1064,17 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIControllerTest do assert %{"error" => "Can't find user"} = json_response(conn, 404) end + test "account fetching also works nickname", %{conn: conn} do + user = insert(:user) + + conn = + conn + |> get("/api/v1/accounts/#{user.nickname}") + + assert %{"id" => id} = json_response(conn, 200) + assert id == user.id + end + test "media upload", %{conn: conn} do file = %Plug.Upload{ content_type: "image/jpg", @@ -1950,7 +1961,7 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIControllerTest do |> json_response(200) end - test "accound_id is required", %{ + test "account_id is required", %{ conn: conn, reporter: reporter, activity: activity |