X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;ds=sidebyside;f=test%2Fweb%2Fmastodon_api%2Fstatus_view_test.exs;h=836a47db05418ef5d9596fe2497a7a1a34eeb41e;hb=641c24cdd46f36205d91a2de7da8bbbfa7aac3ce;hp=198ee72a88c58a719f75d52c6359ed803e1b51a9;hpb=94be93aad08ee9b1d43b1a67d94b694101bf5f1a;p=akkoma diff --git a/test/web/mastodon_api/status_view_test.exs b/test/web/mastodon_api/status_view_test.exs index 198ee72a8..836a47db0 100644 --- a/test/web/mastodon_api/status_view_test.exs +++ b/test/web/mastodon_api/status_view_test.exs @@ -76,5 +76,9 @@ defmodule Pleroma.Web.MastodonAPI.StatusViewTest do } assert expected == StatusView.render("attachment.json", %{attachment: object}) + + # 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}) end end