1 defmodule Pleroma.Web.TwitterAPI.Representers.ObjectReprenterTest do
5 alias Pleroma.Web.TwitterAPI.Representers.ObjectRepresenter
7 test "represent an image attachment" do
14 "mediaType" => "sometype",
29 assert expected_object == ObjectRepresenter.to_map(object)
32 test "represents mastodon-style attachments" do
36 "mediaType" => "image/png",
37 "name" => "blabla", "type" => "Document",
38 "url" => "http://mastodon.example.org/system/media_attachments/files/000/000/001/original/8619f31c6edec470.png"
43 url: "http://mastodon.example.org/system/media_attachments/files/000/000/001/original/8619f31c6edec470.png",
44 mimetype: "image/png",
49 assert expected_object == ObjectRepresenter.to_map(object)