diff options
| author | Egor Kislitsyn <egor@kislitsyn.com> | 2020-04-20 18:37:45 +0400 |
|---|---|---|
| committer | Egor Kislitsyn <egor@kislitsyn.com> | 2020-04-20 18:40:02 +0400 |
| commit | 736fead494f6140871919308e872bb6fe5b7a196 (patch) | |
| tree | 13d9a869a8c551e7d9bb1ad07ca87f7123d74544 /test/web/mastodon_api/controllers/suggestion_controller_test.exs | |
| parent | 163341857a726e8d74b6ddcd1230579e4c36a1b5 (diff) | |
| parent | 28165dad3ac02a6d3ba4b0cda51992a1831515dd (diff) | |
| download | pleroma-736fead494f6140871919308e872bb6fe5b7a196.tar.gz pleroma-736fead494f6140871919308e872bb6fe5b7a196.zip | |
Merge branch 'develop' into openapi/account
Diffstat (limited to 'test/web/mastodon_api/controllers/suggestion_controller_test.exs')
| -rw-r--r-- | test/web/mastodon_api/controllers/suggestion_controller_test.exs | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/test/web/mastodon_api/controllers/suggestion_controller_test.exs b/test/web/mastodon_api/controllers/suggestion_controller_test.exs index c697a39f8..8d0e70db8 100644 --- a/test/web/mastodon_api/controllers/suggestion_controller_test.exs +++ b/test/web/mastodon_api/controllers/suggestion_controller_test.exs @@ -7,34 +7,8 @@ defmodule Pleroma.Web.MastodonAPI.SuggestionControllerTest do alias Pleroma.Config - import Pleroma.Factory - import Tesla.Mock - setup do: oauth_access(["read"]) - setup %{user: user} do - other_user = insert(:user) - host = Config.get([Pleroma.Web.Endpoint, :url, :host]) - url500 = "http://test500?#{host}&#{user.nickname}" - url200 = "http://test200?#{host}&#{user.nickname}" - - mock(fn - %{method: :get, url: ^url500} -> - %Tesla.Env{status: 500, body: "bad request"} - - %{method: :get, url: ^url200} -> - %Tesla.Env{ - status: 200, - body: - ~s([{"acct":"yj455","avatar":"https://social.heldscal.la/avatar/201.jpeg","avatar_static":"https://social.heldscal.la/avatar/s/201.jpeg"}, {"acct":"#{ - other_user.ap_id - }","avatar":"https://social.heldscal.la/avatar/202.jpeg","avatar_static":"https://social.heldscal.la/avatar/s/202.jpeg"}]) - } - end) - - [other_user: other_user] - end - test "returns empty result", %{conn: conn} do res = conn |
