Deny whitespace statuses

This commit is contained in:
dtluna 2017-04-24 12:09:11 +03:00
commit 5b6070ec40
2 changed files with 12 additions and 5 deletions

View file

@ -42,6 +42,9 @@ defmodule Pleroma.Web.TwitterAPI.ControllerTest do
conn = conn_with_creds |> post(request_path, %{ status: "" })
assert json_response(conn, 400) == error_response
conn = conn_with_creds |> post(request_path, %{ status: " " })
assert json_response(conn, 400) == error_response
conn = conn_with_creds |> post(request_path, %{ status: "Nice meme." })
assert json_response(conn, 200) == ActivityRepresenter.to_map(Repo.one(Activity), %{user: user})
end