Object: Rework how Object.normalize works
Now it defaults to not fetching, and the option is named.
This commit is contained in:
parent
afe9c152ab
commit
e1e7e4d379
77 changed files with 269 additions and 246 deletions
|
|
@ -28,8 +28,10 @@ defmodule Pleroma.User.WelcomeChatMessageTest do
|
|||
{:ok, %Pleroma.Activity{} = activity} = WelcomeChatMessage.post_message(user)
|
||||
|
||||
assert user.ap_id in activity.recipients
|
||||
assert Pleroma.Object.normalize(activity).data["type"] == "ChatMessage"
|
||||
assert Pleroma.Object.normalize(activity).data["content"] == "Hello, welcome to Blob/Cat!"
|
||||
assert Pleroma.Object.normalize(activity, fetch: false).data["type"] == "ChatMessage"
|
||||
|
||||
assert Pleroma.Object.normalize(activity, fetch: false).data["content"] ==
|
||||
"Hello, welcome to Blob/Cat!"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -28,7 +28,9 @@ defmodule Pleroma.User.WelcomeMessageTest do
|
|||
{:ok, %Pleroma.Activity{} = activity} = WelcomeMessage.post_message(user)
|
||||
assert user.ap_id in activity.recipients
|
||||
assert activity.data["directMessage"] == true
|
||||
assert Pleroma.Object.normalize(activity).data["content"] =~ "Hello. Welcome to Pleroma"
|
||||
|
||||
assert Pleroma.Object.normalize(activity, fetch: false).data["content"] =~
|
||||
"Hello. Welcome to Pleroma"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue