[#878] Refactored assumptions on embedded object presence in tests. Adjusted note factory to not embed object into activity.
This commit is contained in:
parent
3589b30ddc
commit
daff85a985
17 changed files with 164 additions and 138 deletions
|
|
@ -34,7 +34,7 @@ defmodule Pleroma.Web.CommonAPITest do
|
|||
user = insert(:user)
|
||||
{:ok, activity} = CommonAPI.post(user, %{"status" => "#2hu #2HU"})
|
||||
|
||||
object = Object.normalize(activity.data["object"])
|
||||
object = Object.normalize(activity)
|
||||
|
||||
assert object.data["tag"] == ["2hu"]
|
||||
end
|
||||
|
|
@ -87,7 +87,7 @@ defmodule Pleroma.Web.CommonAPITest do
|
|||
"content_type" => "text/html"
|
||||
})
|
||||
|
||||
object = Object.normalize(activity.data["object"])
|
||||
object = Object.normalize(activity)
|
||||
|
||||
assert object.data["content"] == "<p><b>2hu</b></p>alert('xss')"
|
||||
end
|
||||
|
|
@ -103,7 +103,7 @@ defmodule Pleroma.Web.CommonAPITest do
|
|||
"content_type" => "text/markdown"
|
||||
})
|
||||
|
||||
object = Object.normalize(activity.data["object"])
|
||||
object = Object.normalize(activity)
|
||||
|
||||
assert object.data["content"] == "<p><b>2hu</b></p>alert('xss')"
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue