Merge branch 'chores/bump-copyright' into 'develop'
[akkoma] / test / pleroma / web / o_status / o_status_controller_test.exs
index 65b2c22dbe45bb16ac9a5335f5a3f5ae8675603d..5cdca019a0ccc033bedf79d5e210bbe903b10de4 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.OStatus.OStatusControllerTest do
@@ -72,7 +72,7 @@ defmodule Pleroma.Web.OStatus.OStatusControllerTest do
 
     test "redirects to /notice/id for html format", %{conn: conn} do
       note_activity = insert(:note_activity)
-      object = Object.normalize(note_activity)
+      object = Object.normalize(note_activity, fetch: false)
       [_, uuid] = hd(Regex.scan(~r/.+\/([\w-]+)$/, object.data["id"]))
       url = "/objects/#{uuid}"
 
@@ -82,7 +82,7 @@ defmodule Pleroma.Web.OStatus.OStatusControllerTest do
 
     test "404s on private objects", %{conn: conn} do
       note_activity = insert(:direct_note_activity)
-      object = Object.normalize(note_activity)
+      object = Object.normalize(note_activity, fetch: false)
       [_, uuid] = hd(Regex.scan(~r/.+\/([\w-]+)$/, object.data["id"]))
 
       conn
@@ -133,7 +133,7 @@ defmodule Pleroma.Web.OStatus.OStatusControllerTest do
       conn: conn
     } do
       note_activity = insert(:note_activity)
-      expected_redirect_url = Object.normalize(note_activity).data["id"]
+      expected_redirect_url = Object.normalize(note_activity, fetch: false).data["id"]
 
       redirect_url =
         conn
@@ -230,7 +230,7 @@ defmodule Pleroma.Web.OStatus.OStatusControllerTest do
   describe "GET /notice/:id/embed_player" do
     setup do
       note_activity = insert(:note_activity)
-      object = Pleroma.Object.normalize(note_activity)
+      object = Pleroma.Object.normalize(note_activity, fetch: false)
 
       object_data =
         Map.put(object.data, "attachment", [
@@ -287,7 +287,7 @@ defmodule Pleroma.Web.OStatus.OStatusControllerTest do
 
     test "404s when attachment is empty", %{conn: conn} do
       note_activity = insert(:note_activity)
-      object = Pleroma.Object.normalize(note_activity)
+      object = Pleroma.Object.normalize(note_activity, fetch: false)
       object_data = Map.put(object.data, "attachment", [])
 
       object
@@ -301,7 +301,7 @@ defmodule Pleroma.Web.OStatus.OStatusControllerTest do
 
     test "404s when attachment isn't audio or video", %{conn: conn} do
       note_activity = insert(:note_activity)
-      object = Pleroma.Object.normalize(note_activity)
+      object = Pleroma.Object.normalize(note_activity, fetch: false)
 
       object_data =
         Map.put(object.data, "attachment", [