MastodonAPI: Support poll notification

This commit is contained in:
Alex Gleason 2021-07-17 20:35:35 -05:00
commit 0114754db2
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7
14 changed files with 262 additions and 21 deletions

View file

@ -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
@ -43,6 +44,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