honkoma/test/pleroma/web/pleroma_api/views/app_view_test.exs

22 lines
560 B
Elixir
Raw Normal View History

2021-12-28 00:52:34 +00:00
# Pleroma: A lightweight social networking server
2022-02-26 06:11:42 +00:00
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
2021-12-28 00:52:34 +00:00
# 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