From f53cdabcdf5e64c862e0532e6d5ad26666e9c83f Mon Sep 17 00:00:00 2001 From: eal Date: Sat, 18 Nov 2017 16:30:18 +0200 Subject: Add #nsfw tag if sensitive content bit is set --- test/web/mastodon_api/mastodon_api_controller_test.exs | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'test') diff --git a/test/web/mastodon_api/mastodon_api_controller_test.exs b/test/web/mastodon_api/mastodon_api_controller_test.exs index a00a11f8b..c8b929501 100644 --- a/test/web/mastodon_api/mastodon_api_controller_test.exs +++ b/test/web/mastodon_api/mastodon_api_controller_test.exs @@ -56,6 +56,17 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIControllerTest do assert Repo.get(Activity, id) end + test "posting a sensitive status", %{conn: conn} do + user = insert(:user) + + conn = conn + |> assign(:user, user) + |> post("/api/v1/statuses", %{"status" => "cofe", "sensitive" => true}) + + assert %{"content" => "cofe", "id" => id, "sensitive" => true} = json_response(conn, 200) + assert Repo.get(Activity, id) + end + test "replying to a status", %{conn: conn} do user = insert(:user) -- cgit v1.2.3