added prepare html for RichMedia.Parser
[akkoma] / test / activity_expiration_worker_test.exs
1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2018 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
4
5 defmodule Pleroma.ActivityExpirationWorkerTest do
6 use Pleroma.DataCase
7 alias Pleroma.Activity
8 import Pleroma.Factory
9
10 test "deletes an activity" do
11 activity = insert(:note_activity)
12 expiration = insert(:expiration_in_the_past, %{activity_id: activity.id})
13 Pleroma.ActivityExpirationWorker.perform(:execute, expiration.id)
14
15 refute Repo.get(Activity, activity.id)
16 end
17 end