diff options
author | Egor Kislitsyn <egor@kislitsyn.com> | 2020-04-24 18:37:58 +0400 |
---|---|---|
committer | Egor Kislitsyn <egor@kislitsyn.com> | 2020-04-24 18:37:58 +0400 |
commit | c56c0a3d23929f166f4d95e5c6e96bbf0df8a35e (patch) | |
tree | 6b6fffe4faeebbf7e103d16a427f6f68774b44d5 /test/web/mastodon_api/controllers/status_controller_test.exs | |
parent | 364eecc49f137ae3c7798ad240983591e27b134c (diff) | |
parent | 2430b9bf90d6fde71885f5f0f8be767526be6208 (diff) | |
download | pleroma-c56c0a3d23929f166f4d95e5c6e96bbf0df8a35e.tar.gz pleroma-c56c0a3d23929f166f4d95e5c6e96bbf0df8a35e.zip |
Merge branch 'develop' into global-status-expiration
Diffstat (limited to 'test/web/mastodon_api/controllers/status_controller_test.exs')
-rw-r--r-- | test/web/mastodon_api/controllers/status_controller_test.exs | 11 |
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) |