X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;ds=inline;f=test%2Fpleroma%2Fweb%2Ffeed%2Fuser_controller_test.exs;h=6e3f790b2f0ed1890266b78081bd97ddbfa39857;hb=a0b8e3c84280c11ab43b7660414b64b55c1b7259;hp=50445862bb650083089abf424932b5030f04276a;hpb=ac1298fce817e10cb357162441c77d860c4c757d;p=akkoma
diff --git a/test/pleroma/web/feed/user_controller_test.exs b/test/pleroma/web/feed/user_controller_test.exs
index 50445862b..6e3f790b2 100644
--- a/test/pleroma/web/feed/user_controller_test.exs
+++ b/test/pleroma/web/feed/user_controller_test.exs
@@ -1,5 +1,5 @@
# Pleroma: A lightweight social networking server
-# Copyright © 2017-2020 Pleroma Authors
+# Copyright © 2017-2021 Pleroma Authors
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.Feed.UserControllerTest do
@@ -8,7 +8,6 @@ defmodule Pleroma.Web.Feed.UserControllerTest do
import Pleroma.Factory
import SweetXml
- alias Pleroma.Config
alias Pleroma.Object
alias Pleroma.User
alias Pleroma.Web.CommonAPI
@@ -20,7 +19,7 @@ defmodule Pleroma.Web.Feed.UserControllerTest do
setup do: clear_config([:feed])
setup do
- Config.put(
+ clear_config(
[:feed, :post_title],
%{max_length: 15, omission: "..."}
)
@@ -197,13 +196,26 @@ defmodule Pleroma.Web.Feed.UserControllerTest do
).resp_body
end
- test "with html format, it returns error when user is not found", %{conn: conn} do
+ test "with html format, it falls back to frontend when user is remote", %{conn: conn} do
+ user = insert(:user, local: false)
+
+ {:ok, _} = CommonAPI.post(user, %{status: "test"})
+
+ response =
+ conn
+ |> get("/users/#{user.nickname}")
+ |> response(200)
+
+ assert response =~ "