+
+ test "attachments" do
+ incoming = File.read!("test/fixtures/incoming_reply_mastodon.xml")
+ object = %{
+ "type" => "Image",
+ "url" => [
+ %{
+ "mediaType" => "image/png",
+ "href" => "someurl"
+ }
+ ],
+ "uuid" => 6
+ }
+
+ expected = %{
+ id: 1638338801,
+ type: "image",
+ url: "someurl",
+ remote_url: "someurl",
+ preview_url: "someurl"
+ }
+
+ assert expected == StatusView.render("attachment.json", %{attachment: object})
+ end