Merge branch 'plug-runtime-dev' into 'develop'
[akkoma] / test / pleroma / web / activity_pub / transmogrifier / audio_handling_test.exs
index 181eb7b097bde2d06302cfc647155d82787f79d4..a21e9e3d35785c4edea93a7a93f3634cc56940c1 100644 (file)
@@ -1,5 +1,5 @@
 # Pleroma: A lightweight social networking server
-# Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
+# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
 # SPDX-License-Identifier: AGPL-3.0-only
 
 defmodule Pleroma.Web.ActivityPub.Transmogrifier.AudioHandlingTest do
@@ -35,7 +35,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.AudioHandlingTest do
 
     {:ok, %Activity{local: false} = activity} = Transmogrifier.handle_incoming(data)
 
-    object = Object.normalize(activity)
+    object = Object.normalize(activity, fetch: false)
 
     assert object.data["title"] == "lain radio episode 1"
     assert object.data["artist"] == "lain"
@@ -53,11 +53,11 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.AudioHandlingTest do
         }
     end)
 
-    data = File.read!("test/fixtures/tesla_mock/funkwhale_create_audio.json") |> Poison.decode!()
+    data = File.read!("test/fixtures/tesla_mock/funkwhale_create_audio.json") |> Jason.decode!()
 
     {:ok, %Activity{local: false} = activity} = Transmogrifier.handle_incoming(data)
 
-    assert object = Object.normalize(activity, false)
+    assert object = Object.normalize(activity, fetch: false)
 
     assert object.data["to"] == ["https://www.w3.org/ns/activitystreams#Public"]
 
@@ -70,12 +70,15 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.AudioHandlingTest do
                "mediaType" => "audio/ogg",
                "type" => "Link",
                "name" => nil,
+               "blurhash" => nil,
                "url" => [
                  %{
                    "href" =>
                      "https://channels.tests.funkwhale.audio/api/v1/listen/3901e5d8-0445-49d5-9711-e096cf32e515/?upload=42342395-0208-4fee-a38d-259a6dae0871&download=false",
                    "mediaType" => "audio/ogg",
-                   "type" => "Link"
+                   "type" => "Link",
+                   "width" => nil,
+                   "height" => nil
                  }
                ]
              }