summaryrefslogtreecommitdiff
path: root/test/web/mastodon_api/controllers/status_controller_test.exs
diff options
context:
space:
mode:
authorlain <lain@soykaf.club>2020-04-23 15:47:08 +0200
committerlain <lain@soykaf.club>2020-04-23 15:47:08 +0200
commitec7335535d857c6777798ed08dab357b07fb6efa (patch)
tree09b32798fbaa271c6ea33912899cc067e0cdd495 /test/web/mastodon_api/controllers/status_controller_test.exs
parent1d6338f2d38284e94e17be58c21c7f34b5621ab7 (diff)
parent1b5f8d19eeccfe202c0377079caa6a1d6f3cacb5 (diff)
downloadpleroma-ec7335535d857c6777798ed08dab357b07fb6efa.tar.gz
pleroma-ec7335535d857c6777798ed08dab357b07fb6efa.zip
Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into remake-remodel-dms
Diffstat (limited to 'test/web/mastodon_api/controllers/status_controller_test.exs')
-rw-r--r--test/web/mastodon_api/controllers/status_controller_test.exs11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/web/mastodon_api/controllers/status_controller_test.exs b/test/web/mastodon_api/controllers/status_controller_test.exs
index 162f7b1b2..85068edd0 100644
--- a/test/web/mastodon_api/controllers/status_controller_test.exs
+++ b/test/web/mastodon_api/controllers/status_controller_test.exs
@@ -302,6 +302,17 @@ defmodule Pleroma.Web.MastodonAPI.StatusControllerTest do
assert [] == Repo.all(Activity)
end
+ test "ignores nil values", %{conn: conn} do
+ conn =
+ post(conn, "/api/v1/statuses", %{
+ "status" => "not scheduled",
+ "scheduled_at" => nil
+ })
+
+ assert result = json_response(conn, 200)
+ assert Activity.get_by_id(result["id"])
+ end
+
test "creates a scheduled activity with a media attachment", %{user: user, conn: conn} do
scheduled_at = NaiveDateTime.add(NaiveDateTime.utc_now(), :timer.minutes(120), :millisecond)