X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;f=test%2Fpleroma%2Fweb%2Fcommon_api_test.exs;h=ad0b8754313cd399bb4b263ab9bafef9d8130448;hb=106b5c26781dd1e92b6cd820b3dff41a27a4c4d2;hp=a5dfd39342e0776954aff9b44233518d7ff55fd6;hpb=0ddf492c5d65559adceac3a78b0a648d09292c86;p=akkoma
diff --git a/test/pleroma/web/common_api_test.exs b/test/pleroma/web/common_api_test.exs
index a5dfd3934..ad0b87543 100644
--- a/test/pleroma/web/common_api_test.exs
+++ b/test/pleroma/web/common_api_test.exs
@@ -18,6 +18,7 @@ defmodule Pleroma.Web.CommonAPITest do
alias Pleroma.Web.ActivityPub.Visibility
alias Pleroma.Web.AdminAPI.AccountView
alias Pleroma.Web.CommonAPI
+ alias Pleroma.Workers.PollWorker
import Pleroma.Factory
import Mock
@@ -48,6 +49,12 @@ defmodule Pleroma.Web.CommonAPITest do
assert object.data["type"] == "Question"
assert object.data["oneOf"] |> length() == 2
+
+ assert_enqueued(
+ worker: PollWorker,
+ args: %{op: "poll_end", activity_id: activity.id},
+ scheduled_at: NaiveDateTime.from_iso8601!(object.data["closed"])
+ )
end
end
@@ -202,9 +209,7 @@ defmodule Pleroma.Web.CommonAPITest do
object = Object.normalize(activity, fetch: false)
assert object.data["content"] ==
- "https://example.org is the site of @#{other_user.nickname} #2hu"
+ "https://example.org is the site of @#{other_user.nickname} #2hu"
end
test "it posts a chat message" do