Add URL and code to :not_found errors
[akkoma] / test / pleroma / object / fetcher_test.exs
index cd5437617b6aa5229df14e747e16bcc43ee0a2a1..22192d98f44124f09ea22a909f8b7198184a89fb 100644 (file)
@@ -166,7 +166,7 @@ defmodule Pleroma.Object.FetcherTest do
       Instances.set_consistently_unreachable(id)
       refute Instances.reachable?(id)
 
-      {:ok, object} =
+      {:ok, _object} =
         Fetcher.fetch_object_from_id("http://mastodon.example.org/@admin/99541947525187367")
 
       assert Instances.reachable?(id)
@@ -216,14 +216,16 @@ defmodule Pleroma.Object.FetcherTest do
     end
 
     test "handle HTTP 410 Gone response" do
-      assert {:error, "Object has been deleted"} ==
+      assert {:error,
+              {"Object has been deleted", "https://mastodon.example.org/users/userisgone", 410}} ==
                Fetcher.fetch_and_contain_remote_object_from_id(
                  "https://mastodon.example.org/users/userisgone"
                )
     end
 
     test "handle HTTP 404 response" do
-      assert {:error, "Object has been deleted"} ==
+      assert {:error,
+              {"Object has been deleted", "https://mastodon.example.org/users/userisgone404", 404}} ==
                Fetcher.fetch_and_contain_remote_object_from_id(
                  "https://mastodon.example.org/users/userisgone404"
                )