diff options
author | Roman Chvanikov <chvanikoff@pm.me> | 2020-09-13 12:24:57 +0300 |
---|---|---|
committer | Roman Chvanikov <chvanikoff@pm.me> | 2020-09-13 12:24:57 +0300 |
commit | c5830ac037c0c344bd22b674c41f4dc244a088aa (patch) | |
tree | d5a02f43337536d05b934bee3012dab319ccc127 /test/web/common_api/common_api_test.exs | |
parent | 527afb813af6c64337d02ddf1a2f159fe557acbc (diff) | |
parent | 88fe0a262e21ba1284e72eddb1d41363dc029aa7 (diff) | |
download | pleroma-c5830ac037c0c344bd22b674c41f4dc244a088aa.tar.gz |
Merge develop
Diffstat (limited to 'test/web/common_api/common_api_test.exs')
-rw-r--r-- | test/web/common_api/common_api_test.exs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/web/common_api/common_api_test.exs b/test/web/common_api/common_api_test.exs index 7ceb7ec7f..bdc569e64 100644 --- a/test/web/common_api/common_api_test.exs +++ b/test/web/common_api/common_api_test.exs @@ -600,15 +600,15 @@ defmodule Pleroma.Web.CommonAPITest do test "it can handle activities that expire" do user = insert(:user) - expires_at = - NaiveDateTime.utc_now() - |> NaiveDateTime.truncate(:second) - |> NaiveDateTime.add(1_000_000, :second) + expires_at = DateTime.add(DateTime.utc_now(), 1_000_000) assert {:ok, activity} = CommonAPI.post(user, %{status: "chai", expires_in: 1_000_000}) - assert expiration = Pleroma.ActivityExpiration.get_by_activity_id(activity.id) - assert expiration.scheduled_at == expires_at + assert_enqueued( + worker: Pleroma.Workers.PurgeExpiredActivity, + args: %{activity_id: activity.id}, + scheduled_at: expires_at + ) end end |