projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'feature/emojireactvalidator' into 'develop'
[akkoma]
/
test
/
web
/
mastodon_api
/
views
/
status_view_test.exs
diff --git
a/test/web/mastodon_api/views/status_view_test.exs
b/test/web/mastodon_api/views/status_view_test.exs
index b64370c3feaa01efa52f7bdec323604542c8de21..b5e7dc3171bad7a27f8e3b844eb7383fad3dd4e7 100644
(file)
--- a/
test/web/mastodon_api/views/status_view_test.exs
+++ b/
test/web/mastodon_api/views/status_view_test.exs
@@
-402,11
+402,17
@@
defmodule Pleroma.Web.MastodonAPI.StatusViewTest do
pleroma: %{mime_type: "image/png"}
}
pleroma: %{mime_type: "image/png"}
}
+ api_spec = Pleroma.Web.ApiSpec.spec()
+
assert expected == StatusView.render("attachment.json", %{attachment: object})
assert expected == StatusView.render("attachment.json", %{attachment: object})
+ OpenApiSpex.TestAssertions.assert_schema(expected, "Attachment", api_spec)
# If theres a "id", use that instead of the generated one
object = Map.put(object, "id", 2)
# If theres a "id", use that instead of the generated one
object = Map.put(object, "id", 2)
- assert %{id: "2"} = StatusView.render("attachment.json", %{attachment: object})
+ result = StatusView.render("attachment.json", %{attachment: object})
+
+ assert %{id: "2"} = result
+ OpenApiSpex.TestAssertions.assert_schema(result, "Attachment", api_spec)
end
test "put the url advertised in the Activity in to the url attribute" do
end
test "put the url advertised in the Activity in to the url attribute" do