diff options
| author | lain <lain@soykaf.club> | 2020-05-07 14:45:20 +0200 |
|---|---|---|
| committer | lain <lain@soykaf.club> | 2020-05-07 14:45:20 +0200 |
| commit | f0c22df2265e922a66ca69c3508fe812b8e20b6b (patch) | |
| tree | be510abc9cc9154e07b2ec9eaf344e6e4e88bed1 /test/web/mastodon_api/views | |
| parent | 92caae592338a3ca307686e7644f2de18bb57ce5 (diff) | |
| parent | 4c92dfb73ef1f40438adf5da009499205a677912 (diff) | |
| download | pleroma-f0c22df2265e922a66ca69c3508fe812b8e20b6b.tar.gz pleroma-f0c22df2265e922a66ca69c3508fe812b8e20b6b.zip | |
Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into feature/undo-validator-reduced
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 |
