summaryrefslogtreecommitdiff
path: root/test/pleroma/web/pleroma_api/views/app_view_test.exs
blob: f0aee698731af54bfe543b16ab9ee0c36461aade (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# Pleroma: A lightweight social networking server
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only

defmodule Pleroma.Web.PleromaAPI.AppViewTest do
  use Pleroma.DataCase, async: true
  alias Pleroma.Web.PleromaAPI.AppView
  import Pleroma.Factory

  test "index.json" do
    apps = [
      insert(:oauth_app),
      insert(:oauth_app),
      insert(:oauth_app)
    ]

    results = AppView.render("index.json", %{apps: apps})

    assert [%{client_id: _, client_secret: _}, _, _] = results
  end
end