From 02098bbb3d4ba6ed23a940ff2dac22f90ce48053 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Tue, 20 Jun 2023 15:01:04 +0200 Subject: [PATCH] test(export): add basic test for ExportController Signed-off-by: Thomas Citharel --- test/web/controllers/export_controller_test.exs | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 test/web/controllers/export_controller_test.exs diff --git a/test/web/controllers/export_controller_test.exs b/test/web/controllers/export_controller_test.exs new file mode 100644 index 00000000..253a080d --- /dev/null +++ b/test/web/controllers/export_controller_test.exs @@ -0,0 +1,13 @@ +# Portions of this file are derived from Pleroma: +# Copyright © 2017-2018 Pleroma Authors +# SPDX-License-Identifier: AGPL-3.0-only +# Upstream: https://git.pleroma.social/pleroma/pleroma/blob/develop/test/web/web_finger/web_finger_test.exs + +defmodule Mobilizon.Web.ExportControllerTest do + use Mobilizon.Web.ConnCase + + test "GET /.well-known/webfinger with no query", %{conn: conn} do + conn = get(conn, "/exports/not_existing/whatever") + assert response(conn, 404) == "Export to format not_existing is not enabled on this instance" + end +end