1 defmodule Pleroma.Web.MastoFEControllerTest do
2 use Pleroma.Web.ConnCase, async: true
3 alias Pleroma.Web.MastodonAPI.AuthController
5 describe "index/2 (main page)" do
6 test "GET /web/ (glitch-soc)" do
7 clear_config([:frontends, :mastodon], %{"name" => "mastodon-fe"})
9 {:ok, masto_app} = AuthController.local_mastofe_app()
10 user = Pleroma.Factory.insert(:user)
11 token = Pleroma.Factory.insert(:oauth_token, app: masto_app, user: user)
12 %{conn: conn} = oauth_access(["read", "write"], oauth_token: token, user: user)
16 |> get("/web/getting-started")
19 assert resp =~ "glitch"
22 test "GET /web/ (fedibird)" do
23 clear_config([:frontends, :mastodon], %{"name" => "fedibird-fe"})
25 {:ok, masto_app} = AuthController.local_mastofe_app()
26 user = Pleroma.Factory.insert(:user)
27 token = Pleroma.Factory.insert(:oauth_token, app: masto_app, user: user)
28 %{conn: conn} = oauth_access(["read", "write"], oauth_token: token, user: user)
32 |> get("/web/getting-started")
35 refute resp =~ "glitch"