summaryrefslogtreecommitdiff
path: root/test/scheduled_activity_test.exs
diff options
context:
space:
mode:
authorMaksim Pechnikov <parallel588@gmail.com>2020-01-23 11:05:08 +0300
committerMaksim Pechnikov <parallel588@gmail.com>2020-01-23 11:05:08 +0300
commitce7c887a27ad5af59f540650637a50da7f91fa52 (patch)
treeea73f731910120c238ba384866334449a12e3260 /test/scheduled_activity_test.exs
parent6f77b7742837f476fb2bf732e5c4ba6bc4fb3799 (diff)
downloadpleroma-ce7c887a27ad5af59f540650637a50da7f91fa52.tar.gz
pleroma-ce7c887a27ad5af59f540650637a50da7f91fa52.zip
removed try/rescue
Diffstat (limited to 'test/scheduled_activity_test.exs')
-rw-r--r--test/scheduled_activity_test.exs29
1 files changed, 0 insertions, 29 deletions
diff --git a/test/scheduled_activity_test.exs b/test/scheduled_activity_test.exs
index d2c5f5aa2..6c13d300a 100644
--- a/test/scheduled_activity_test.exs
+++ b/test/scheduled_activity_test.exs
@@ -102,33 +102,4 @@ defmodule Pleroma.ScheduledActivityTest do
assert changeset.errors == [scheduled_at: {"must be at least 5 minutes from now", []}]
end
end
-
- test "creates a status from the scheduled activity" do
- Pleroma.Config.put([ScheduledActivity, :enabled], true)
- user = insert(:user)
-
- naive_datetime =
- NaiveDateTime.add(
- NaiveDateTime.utc_now(),
- -:timer.minutes(2),
- :millisecond
- )
-
- scheduled_activity =
- insert(
- :scheduled_activity,
- scheduled_at: naive_datetime,
- user: user,
- params: %{status: "hi"}
- )
-
- Pleroma.Workers.ScheduledActivityWorker.perform(
- %{"activity_id" => scheduled_activity.id},
- :pid
- )
-
- refute Repo.get(ScheduledActivity, scheduled_activity.id)
- activity = Repo.all(Pleroma.Activity) |> Enum.find(&(&1.actor == user.ap_id))
- assert Pleroma.Object.normalize(activity).data["content"] == "hi"
- end
end