summaryrefslogtreecommitdiff
path: root/test/pleroma/web/mastodon_api/controllers/status_controller_test.exs
diff options
context:
space:
mode:
authorEgor Kislitsyn <egor@kislitsyn.com>2020-11-17 18:29:52 +0400
committerEgor Kislitsyn <egor@kislitsyn.com>2020-11-17 18:29:52 +0400
commit79d2d3f609ccb14c532ada6fbaf600224f8e4f07 (patch)
tree9bd591d0920c13256f9cb76bd4a7035ed1afaaa6 /test/pleroma/web/mastodon_api/controllers/status_controller_test.exs
parentfb41bd1a85b0bcf41a306a0f89307ed80029bc04 (diff)
parentfbd6217ed9e07fb0353263566e2978b5a2396189 (diff)
Merge branch 'develop' into hide-muted-reactions
Diffstat (limited to 'test/pleroma/web/mastodon_api/controllers/status_controller_test.exs')
-rw-r--r--test/pleroma/web/mastodon_api/controllers/status_controller_test.exs19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/pleroma/web/mastodon_api/controllers/status_controller_test.exs b/test/pleroma/web/mastodon_api/controllers/status_controller_test.exs
index 49a100f1c..44e63eb80 100644
--- a/test/pleroma/web/mastodon_api/controllers/status_controller_test.exs
+++ b/test/pleroma/web/mastodon_api/controllers/status_controller_test.exs
@@ -1741,6 +1741,25 @@ defmodule Pleroma.Web.MastodonAPI.StatusControllerTest do
|> json_response_and_validate_schema(:ok)
end
+ test "posting a local only status" do
+ %{user: _user, conn: conn} = oauth_access(["write:statuses"])
+
+ conn_one =
+ conn
+ |> put_req_header("content-type", "application/json")
+ |> post("/api/v1/statuses", %{
+ "status" => "cofe",
+ "visibility" => "local"
+ })
+
+ local = Pleroma.Constants.as_local_public()
+
+ assert %{"content" => "cofe", "id" => id, "visibility" => "local"} =
+ json_response(conn_one, 200)
+
+ assert %Activity{id: ^id, data: %{"to" => [^local]}} = Activity.get_by_id(id)
+ end
+
describe "muted reactions" do
test "index" do
%{conn: conn, user: user} = oauth_access(["read:statuses"])