X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=test%2Fpleroma%2Fweb%2Factivity_pub%2Ftransmogrifier%2Faudio_handling_test.exs;h=e733f167d0ec486fd46732d0da2e0ed198a50b49;hb=2217b35bd40593f5dcfdba4c13dd7b7bded018f3;hp=0636d00c5bd5b9cf646dee332df67388459cc286;hpb=c3112fd13a6af239b9dff0813e93266ec58f571e;p=akkoma diff --git a/test/pleroma/web/activity_pub/transmogrifier/audio_handling_test.exs b/test/pleroma/web/activity_pub/transmogrifier/audio_handling_test.exs index 0636d00c5..e733f167d 100644 --- a/test/pleroma/web/activity_pub/transmogrifier/audio_handling_test.exs +++ b/test/pleroma/web/activity_pub/transmogrifier/audio_handling_test.exs @@ -1,5 +1,5 @@ # Pleroma: A lightweight social networking server -# Copyright © 2017-2020 Pleroma Authors +# Copyright © 2017-2021 Pleroma Authors # 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" @@ -48,15 +48,16 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.AudioHandlingTest do %{url: "https://channels.tests.funkwhale.audio/federation/actors/compositions"} -> %Tesla.Env{ status: 200, - body: File.read!("test/fixtures/tesla_mock/funkwhale_channel.json") + body: File.read!("test/fixtures/tesla_mock/funkwhale_channel.json"), + headers: HttpRequestMock.activitypub_object_headers() } 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"] @@ -69,6 +70,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.AudioHandlingTest do "mediaType" => "audio/ogg", "type" => "Link", "name" => nil, + "blurhash" => nil, "url" => [ %{ "href" =>