diff options
| author | lain <lain@soykaf.club> | 2020-05-06 11:44:30 +0200 |
|---|---|---|
| committer | lain <lain@soykaf.club> | 2020-05-06 11:44:30 +0200 |
| commit | 205313e54146c00374e3edfa951132a7229fa16d (patch) | |
| tree | db392c5ef71a2a40fb8a041635d2536b34dc454d /test/web/mastodon_api/views | |
| parent | 9637cded21cef1e6c531dd46d5f5245c4c3ed03c (diff) | |
| parent | 07e7c80bc9e919cd92ca9dda1e21384142e5bd77 (diff) | |
| download | pleroma-205313e54146c00374e3edfa951132a7229fa16d.tar.gz pleroma-205313e54146c00374e3edfa951132a7229fa16d.zip | |
Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into remake-remodel-dms
Diffstat (limited to 'test/web/mastodon_api/views')
| -rw-r--r-- | test/web/mastodon_api/views/status_view_test.exs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/test/web/mastodon_api/views/status_view_test.exs b/test/web/mastodon_api/views/status_view_test.exs index 6791c2fb0..451723e60 100644 --- 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"} } + api_spec = Pleroma.Web.ApiSpec.spec() + 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) - 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 |
