summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAlex Gleason <alex@alexgleason.me>2021-12-19 18:18:59 +0000
committerAlex Gleason <alex@alexgleason.me>2021-12-19 18:18:59 +0000
commitb0d2b539347f75b15bdeb38d80ff4e0d8dc9fec5 (patch)
treed206eb087c3eb77456942560e759ab77e45218f7 /test
parentdf5359aa728211e570c98a7bd30fa3f84629417f (diff)
parente4f9cb1c1b3969164c03a219d5a760df07d2b3cd (diff)
Merge branch 'manifest' into 'develop'
Expose /manifest.json for PWA Closes #882 See merge request pleroma/pleroma!3544
Diffstat (limited to 'test')
-rw-r--r--test/pleroma/web/manifest_controller_test.exs17
-rw-r--r--test/pleroma/web/plugs/frontend_static_plug_test.exs1
2 files changed, 18 insertions, 0 deletions
diff --git a/test/pleroma/web/manifest_controller_test.exs b/test/pleroma/web/manifest_controller_test.exs
new file mode 100644
index 000000000..b7a4940db
--- /dev/null
+++ b/test/pleroma/web/manifest_controller_test.exs
@@ -0,0 +1,17 @@
+# Pleroma: A lightweight social networking server
+# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
+# SPDX-License-Identifier: AGPL-3.0-only
+
+defmodule Pleroma.Web.ManifestControllerTest do
+ use Pleroma.Web.ConnCase
+
+ setup do
+ clear_config([:instance, :name], "Manifest Test")
+ clear_config([:manifest, :theme_color], "#ff0000")
+ end
+
+ test "manifest.json", %{conn: conn} do
+ conn = get(conn, "/manifest.json")
+ assert %{"name" => "Manifest Test", "theme_color" => "#ff0000"} = json_response(conn, 200)
+ end
+end
diff --git a/test/pleroma/web/plugs/frontend_static_plug_test.exs b/test/pleroma/web/plugs/frontend_static_plug_test.exs
index 45cd70a2c..52379b86a 100644
--- a/test/pleroma/web/plugs/frontend_static_plug_test.exs
+++ b/test/pleroma/web/plugs/frontend_static_plug_test.exs
@@ -94,6 +94,7 @@ defmodule Pleroma.Web.Plugs.FrontendStaticPlugTest do
"internal",
".well-known",
"nodeinfo",
+ "manifest.json",
"auth",
"proxy",
"phoenix",