diff options
author | Haelwenn <contact+git.pleroma.social@hacktivis.me> | 2020-05-06 01:04:50 +0000 |
---|---|---|
committer | Haelwenn <contact+git.pleroma.social@hacktivis.me> | 2020-05-06 01:04:50 +0000 |
commit | 7612d9403dbaa6741b28dcf427ecad8fd0f70c30 (patch) | |
tree | 6b36a02994b7772631681c6183bfdffe6deee384 /test/web/mastodon_api/views | |
parent | 42a2acac46602d25e7b63042990dfa56eee25b76 (diff) | |
parent | 332e016bcdbda5dca90d916bc62a9c67544b5323 (diff) | |
download | pleroma-7612d9403dbaa6741b28dcf427ecad8fd0f70c30.tar.gz pleroma-7612d9403dbaa6741b28dcf427ecad8fd0f70c30.zip |
Merge branch 'openapi/scheduled_activities' into 'develop'
Add OpenAPI spec for ScheduledActivityController
See merge request pleroma/pleroma!2477
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 |