move to 2.5.5
[anni] / test / pleroma / web / mastodon_api / mastodon_api_controller_test.exs
1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
4
5 defmodule Pleroma.Web.MastodonAPI.MastodonAPIControllerTest do
6   use Pleroma.Web.ConnCase, async: true
7
8   describe "empty_array/2 (stubs)" do
9     test "GET /api/v1/accounts/:id/identity_proofs" do
10       %{user: user, conn: conn} = oauth_access(["read:accounts"])
11
12       assert [] ==
13                conn
14                |> get("/api/v1/accounts/#{user.id}/identity_proofs")
15                |> json_response(200)
16     end
17
18     test "GET /api/v1/endorsements" do
19       %{conn: conn} = oauth_access(["read:accounts"])
20
21       assert [] ==
22                conn
23                |> get("/api/v1/endorsements")
24                |> json_response(200)
25     end
26
27     test "GET /api/v1/trends", %{conn: conn} do
28       assert [] ==
29                conn
30                |> get("/api/v1/trends")
31                |> json_response(200)
32     end
33   end
34 end