summaryrefslogtreecommitdiff
path: root/test/web/mastodon_api/controllers/status_controller_test.exs
diff options
context:
space:
mode:
authorEgor Kislitsyn <egor@kislitsyn.com>2020-04-27 14:33:00 +0400
committerEgor Kislitsyn <egor@kislitsyn.com>2020-04-27 14:33:00 +0400
commitf1ca917bb0d733445657e0be92440dedc2f8d3c6 (patch)
tree175db64bc7d9c32bc5c2f2e7b443daa040e4d65c /test/web/mastodon_api/controllers/status_controller_test.exs
parent1b06a27746ccbbdec77b7bc1571783a64ade4431 (diff)
parent01cc93b6873b5c50c0fc54774a3b004bf660e46b (diff)
downloadpleroma-f1ca917bb0d733445657e0be92440dedc2f8d3c6.tar.gz
pleroma-f1ca917bb0d733445657e0be92440dedc2f8d3c6.zip
Merge branch 'develop' into openapi/account
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)