From 1377ec33fe6fa62734215d2061941bc301347a25 Mon Sep 17 00:00:00 2001 From: Walter Huf Date: Thu, 27 Jul 2023 09:01:46 -0700 Subject: [PATCH] Add a unit test for custom WebFinger domain --- test/pleroma/web/web_finger/web_finger_controller_test.exs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/pleroma/web/web_finger/web_finger_controller_test.exs b/test/pleroma/web/web_finger/web_finger_controller_test.exs index 29cb6e01b..f2e8e4717 100644 --- a/test/pleroma/web/web_finger/web_finger_controller_test.exs +++ b/test/pleroma/web/web_finger/web_finger_controller_test.exs @@ -8,6 +8,7 @@ defmodule Pleroma.Web.WebFinger.WebFingerControllerTest do import ExUnit.CaptureLog import Pleroma.Factory import Tesla.Mock + alias Pleroma.Web.Metadata.Utils setup do mock(fn env -> apply(HttpRequestMock, :request, [env]) end) @@ -60,6 +61,8 @@ defmodule Pleroma.Web.WebFinger.WebFingerControllerTest do user = insert(:user, ap_id: "https://sub.example.com/users/bobby", nickname: "bobby") + assert Utils.user_name_string(user) == "#{user.name} (@bobby@example.com)" + response = build_conn() |> put_req_header("accept", "application/jrd+json")