aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authoreal <eal@waifu.club>2017-11-18 16:30:18 +0200
committereal <eal@waifu.club>2017-11-18 16:30:18 +0200
commitf53cdabcdf5e64c862e0532e6d5ad26666e9c83f (patch)
treeeaf8417b010b75cc7a6cb8200196c6da59522c8f /test
parent4647bcd6e647ad31ba492a6e712721b58bf47e83 (diff)
downloadpleroma-f53cdabcdf5e64c862e0532e6d5ad26666e9c83f.tar.gz
Add #nsfw tag if sensitive content bit is set
Diffstat (limited to 'test')
-rw-r--r--test/web/mastodon_api/mastodon_api_controller_test.exs11
1 files changed, 11 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 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)