aboutsummaryrefslogtreecommitdiff
path: root/test/web
diff options
context:
space:
mode:
authorkaniini <nenolod@gmail.com>2019-05-15 15:42:21 +0000
committerkaniini <nenolod@gmail.com>2019-05-15 15:42:21 +0000
commit62516be9c462ca206163eaf7822f9ee5c2470453 (patch)
treeaf639337d050e26032aca0f1f2336bb6f3f205bf /test/web
parent4440e23547dddc58252318282e3f417bafd6ee4c (diff)
parent70c81b95d095a7148085201cfa3a07283ef296d9 (diff)
downloadpleroma-62516be9c462ca206163eaf7822f9ee5c2470453.tar.gz
Merge branch 'fix/public-option-not-working' into 'develop'
Fix public option not working Closes #873 See merge request pleroma/pleroma!1143
Diffstat (limited to 'test/web')
-rw-r--r--test/web/mastodon_api/mastodon_api_controller_test.exs13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/web/mastodon_api/mastodon_api_controller_test.exs b/test/web/mastodon_api/mastodon_api_controller_test.exs
index 5c79ee633..40e7739e7 100644
--- a/test/web/mastodon_api/mastodon_api_controller_test.exs
+++ b/test/web/mastodon_api/mastodon_api_controller_test.exs
@@ -81,6 +81,19 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIControllerTest do
end)
end
+ test "the public timeline when public is set to false", %{conn: conn} do
+ public = Pleroma.Config.get([:instance, :public])
+ Pleroma.Config.put([:instance, :public], false)
+
+ on_exit(fn ->
+ Pleroma.Config.put([:instance, :public], public)
+ end)
+
+ assert conn
+ |> get("/api/v1/timelines/public", %{"local" => "False"})
+ |> json_response(403) == %{"error" => "This resource requires authentication."}
+ end
+
test "posting a status", %{conn: conn} do
user = insert(:user)