diff options
| author | Phil Hagelberg <phil@hagelb.org> | 2019-11-11 17:16:44 -0800 | 
|---|---|---|
| committer | Phil Hagelberg <phil@hagelb.org> | 2019-11-12 09:40:29 -0800 | 
| commit | 62f3a93049649dee0ccd7b883887be2fd343fb3e (patch) | |
| tree | 3bba8ee493ec32a3f612c4f0011f6f0cc63b4640 /test | |
| parent | fb090b748ab7ec3740008017f419e210405e2633 (diff) | |
| download | pleroma-62f3a93049649dee0ccd7b883887be2fd343fb3e.tar.gz pleroma-62f3a93049649dee0ccd7b883887be2fd343fb3e.zip | |
For remote notices, redirect to the original instead of 404.
We shouldn't treat these like local statuses, but I don't think a 404
is the right choice either here, because within pleroma-fe, these are
valid URLs. So with remote notices you have the awkward situation
where clicking a link will behave differently depending on whether you
open it in a new tab or not; the new tab will 404 if it hits static-fe.
This new redirecting behavior should improve that situation.
Diffstat (limited to 'test')
| -rw-r--r-- | test/web/static_fe/static_fe_controller_test.exs | 4 | 
1 files changed, 2 insertions, 2 deletions
| diff --git a/test/web/static_fe/static_fe_controller_test.exs b/test/web/static_fe/static_fe_controller_test.exs index effdfbeb3..b8fb67b22 100644 --- a/test/web/static_fe/static_fe_controller_test.exs +++ b/test/web/static_fe/static_fe_controller_test.exs @@ -151,7 +151,7 @@ defmodule Pleroma.Web.StaticFE.StaticFEControllerTest do        assert html_response(conn, 404) =~ "not found"      end -    test "404 for remote cached status", %{conn: conn} do +    test "302 for remote cached status", %{conn: conn} do        user = insert(:user)        message = %{ @@ -175,7 +175,7 @@ defmodule Pleroma.Web.StaticFE.StaticFEControllerTest do          |> put_req_header("accept", "text/html")          |> get("/notice/#{activity.id}") -      assert html_response(conn, 404) =~ "not found" +      assert html_response(conn, 302) =~ "redirected"      end    end  end | 
