summaryrefslogtreecommitdiff
path: root/test/web/common_api/common_api_test.exs
diff options
context:
space:
mode:
authorrinpatch <rinpatch@sdf.org>2019-07-09 20:00:37 +0000
committerrinpatch <rinpatch@sdf.org>2019-07-09 20:00:37 +0000
commit81f1017b84bbe1a493aaf6f43687af2f2546b6a1 (patch)
treebb2d77d97f46f51c7d3b3e719fe29faac41432af /test/web/common_api/common_api_test.exs
parent2bb945cb70751bc8e72c036040130bb54c32f391 (diff)
parent8a41d34673532c03cf99a2334399b9436e245f1b (diff)
downloadpleroma-81f1017b84bbe1a493aaf6f43687af2f2546b6a1.tar.gz
pleroma-81f1017b84bbe1a493aaf6f43687af2f2546b6a1.zip
Merge branch '878-activity-object-decoupling-in-tests' into 'develop'
[#878] Refactored assumptions on embedded object presence in tests Closes #878 See merge request pleroma/pleroma!1390
Diffstat (limited to 'test/web/common_api/common_api_test.exs')
-rw-r--r--test/web/common_api/common_api_test.exs6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/web/common_api/common_api_test.exs b/test/web/common_api/common_api_test.exs
index 6f57bbe1f..958c931c4 100644
--- a/test/web/common_api/common_api_test.exs
+++ b/test/web/common_api/common_api_test.exs
@@ -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