Transmogrifier: Make proper use of the LikeValidator.
This commit is contained in:
parent
66452f518f
commit
203d61b950
5 changed files with 68 additions and 29 deletions
|
|
@ -13,6 +13,8 @@ defmodule Pleroma.Web.ActivityPub.ObjectValidatorTest do
|
|||
{:ok, post_activity} = CommonAPI.post(user, %{"status" => "uguu"})
|
||||
|
||||
valid_like = %{
|
||||
"to" => [user.ap_id],
|
||||
"cc" => [],
|
||||
"type" => "Like",
|
||||
"id" => Utils.generate_activity_id(),
|
||||
"object" => post_activity.data["object"],
|
||||
|
|
|
|||
|
|
@ -333,7 +333,9 @@ defmodule Pleroma.Web.ActivityPub.TransmogrifierTest do
|
|||
|> Poison.decode!()
|
||||
|> Map.put("object", activity.data["object"])
|
||||
|
||||
{:ok, %Activity{data: data, local: false}} = Transmogrifier.handle_incoming(data)
|
||||
{:ok, %Activity{data: data, local: false} = activity} = Transmogrifier.handle_incoming(data)
|
||||
|
||||
refute Enum.empty?(activity.recipients)
|
||||
|
||||
assert data["actor"] == "http://mastodon.example.org/users/admin"
|
||||
assert data["type"] == "Like"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue