Merge pull request 'Reblog content should be ""' (#489) from masto4-reboost into...
[akkoma] / test / pleroma / web / pleroma_api / views / app_view_test.exs
1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
4
5 defmodule Pleroma.Web.PleromaAPI.AppViewTest do
6 use Pleroma.DataCase, async: true
7 alias Pleroma.Web.PleromaAPI.AppView
8 import Pleroma.Factory
9
10 test "index.json" do
11 apps = [
12 insert(:oauth_app),
13 insert(:oauth_app),
14 insert(:oauth_app)
15 ]
16
17 results = AppView.render("index.json", %{apps: apps})
18
19 assert [%{client_id: _, client_secret: _}, _, _] = results
20 end
21 end