MastodonAPI: Support poll notification
This commit is contained in:
parent
b221d77a6d
commit
0114754db2
14 changed files with 262 additions and 21 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue