Resolve follow activity from accept/reject without ID (#328)
[akkoma] / test / pleroma / web / activity_pub / transmogrifier / audio_handling_test.exs
index a929f828db62f81b1f965ea8c2c3f7986e2ff2a7..f8b56685b71f4b57a6e3fd8963ac6b0c98d818db 100644 (file)
@@ -10,41 +10,6 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.AudioHandlingTest do
   alias Pleroma.Object
   alias Pleroma.Web.ActivityPub.Transmogrifier
 
-  import Pleroma.Factory
-
-  test "it works for incoming listens" do
-    _user = insert(:user, ap_id: "http://mastodon.example.org/users/admin")
-
-    data = %{
-      "@context" => "https://www.w3.org/ns/activitystreams",
-      "to" => ["https://www.w3.org/ns/activitystreams#Public"],
-      "cc" => [],
-      "type" => "Listen",
-      "id" => "http://mastodon.example.org/users/admin/listens/1234/activity",
-      "actor" => "http://mastodon.example.org/users/admin",
-      "object" => %{
-        "type" => "Audio",
-        "to" => ["https://www.w3.org/ns/activitystreams#Public"],
-        "cc" => [],
-        "id" => "http://mastodon.example.org/users/admin/listens/1234",
-        "attributedTo" => "http://mastodon.example.org/users/admin",
-        "title" => "lain radio episode 1",
-        "artist" => "lain",
-        "album" => "lain radio",
-        "length" => 180_000
-      }
-    }
-
-    {:ok, %Activity{local: false} = activity} = Transmogrifier.handle_incoming(data)
-
-    object = Object.normalize(activity, fetch: false)
-
-    assert object.data["title"] == "lain radio episode 1"
-    assert object.data["artist"] == "lain"
-    assert object.data["album"] == "lain radio"
-    assert object.data["length"] == 180_000
-  end
-
   test "Funkwhale Audio object" do
     Tesla.Mock.mock(fn
       %{url: "https://channels.tests.funkwhale.audio/federation/actors/compositions"} ->
@@ -73,16 +38,12 @@ 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",
-                   "width" => nil,
-                   "height" => nil
+                   "type" => "Link"
                  }
                ]
              }