Add #nsfw tag if sensitive content bit is set
This commit is contained in:
parent
4647bcd6e6
commit
f53cdabcdf
3 changed files with 14 additions and 2 deletions
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue