diff options
author | Ivan Tashkinov <ivantashkinov@gmail.com> | 2020-04-28 19:56:20 +0300 |
---|---|---|
committer | Ivan Tashkinov <ivantashkinov@gmail.com> | 2020-04-28 19:56:20 +0300 |
commit | 908cf22a6cb07044eb0fb44c9673c8adcf22c0db (patch) | |
tree | b522172092989cb1d1312f846974ff55493fbee9 /test/web/mastodon_api/controllers/status_controller_test.exs | |
parent | b4139cc5472079a34f0256ac9991a0222844d44c (diff) | |
parent | 699fc9569fa06278baaec6804348375cb9891185 (diff) | |
download | pleroma-908cf22a6cb07044eb0fb44c9673c8adcf22c0db.tar.gz pleroma-908cf22a6cb07044eb0fb44c9673c8adcf22c0db.zip |
Merge remote-tracking branch 'remotes/origin/develop' into automatic-authentication-and-instance-publicity-checks
# Conflicts:
# lib/pleroma/web/mastodon_api/controllers/account_controller.ex
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) |