diff options
| author | Ivan Tashkinov <ivantashkinov@gmail.com> | 2020-10-02 22:18:02 +0300 |
|---|---|---|
| committer | Ivan Tashkinov <ivantashkinov@gmail.com> | 2020-10-02 22:18:02 +0300 |
| commit | f6024252ae8601d41bea943bb3cae5c656416eb9 (patch) | |
| tree | 716b3a722226f9d9f0ad53756f0ca33785e51542 /test/web/activity_pub/activity_pub_controller_test.exs | |
| parent | 0d575735bfd280b878bdecc6d018d8cca23ad09f (diff) | |
| download | pleroma-f6024252ae8601d41bea943bb3cae5c656416eb9.tar.gz pleroma-f6024252ae8601d41bea943bb3cae5c656416eb9.zip | |
[#3053] No auth check in StaticFEController, even on non-federating instances. Adjusted tests.
Diffstat (limited to 'test/web/activity_pub/activity_pub_controller_test.exs')
| -rw-r--r-- | test/web/activity_pub/activity_pub_controller_test.exs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/web/activity_pub/activity_pub_controller_test.exs b/test/web/activity_pub/activity_pub_controller_test.exs index 0517571f2..ab57b6523 100644 --- a/test/web/activity_pub/activity_pub_controller_test.exs +++ b/test/web/activity_pub/activity_pub_controller_test.exs @@ -33,6 +33,25 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubControllerTest do setup do: clear_config([:instance, :federating], true) + defp ensure_federating_or_authenticated(conn, url, user) do + Config.put([:instance, :federating], false) + + conn + |> get(url) + |> response(403) + + conn + |> assign(:user, user) + |> get(url) + |> response(200) + + Config.put([:instance, :federating], true) + + conn + |> get(url) + |> response(200) + end + describe "/relay" do setup do: clear_config([:instance, :allow_relay]) |
