akkoma/test/pleroma/web/masto_fe_controller_test.exs
FloatingGhost 98cb255d12 Support elixir1.15
OTP builds to 1.15

Changelog entry

Ensure policies are fully loaded

Fix :warn

use main branch for linkify

Fix warn in tests

Migrations for phoenix 1.17

Revert "Migrations for phoenix 1.17"

This reverts commit 6a3b2f15b74ea5e33150529385215b7a531f3999.

Oban upgrade

Add default empty whitelist

mix format

limit test to amd64

OTP 26 tests for 1.15

use OTP_VERSION tag

baka

just 1.15

Massive deps update

Update locale, deps

Mix format

shell????

multiline???

?

max cases 1

use assert_recieve

don't put_env in async tests

don't async conn/fs tests

mix format

FIx some uploader issues

Fix tests
2023-08-03 17:44:09 +01:00

38 lines
1.2 KiB
Elixir

defmodule Pleroma.Web.MastoFEControllerTest do
use Pleroma.Web.ConnCase, async: false
alias Pleroma.Web.MastodonAPI.AuthController
describe "index/2 (main page)" do
test "GET /web/ (glitch-soc)" do
clear_config([:frontends, :mastodon], %{"name" => "mastodon-fe"})
{:ok, masto_app} = AuthController.local_mastofe_app()
user = Pleroma.Factory.insert(:user)
token = Pleroma.Factory.insert(:oauth_token, app: masto_app, user: user)
%{conn: conn} = oauth_access(["read", "write"], oauth_token: token, user: user)
resp =
conn
|> get("/web/getting-started")
|> html_response(200)
assert resp =~ "glitch"
end
test "GET /web/ (fedibird)" do
clear_config([:frontends, :mastodon], %{"name" => "fedibird-fe"})
{:ok, masto_app} = AuthController.local_mastofe_app()
user = Pleroma.Factory.insert(:user)
token = Pleroma.Factory.insert(:oauth_token, app: masto_app, user: user)
%{conn: conn} = oauth_access(["read", "write"], oauth_token: token, user: user)
resp =
conn
|> get("/web/getting-started")
|> html_response(200)
refute resp =~ "glitch"
end
end
end