Merge branch 'feature/jobs' into 'develop'
[akkoma] / test / web / websub / websub_controller_test.exs
index c445ed676e8b3aa82f1c6632106e496212cbb899..87b01d89b5cba80b5a381eb0067ef41bf7272095 100644 (file)
@@ -6,7 +6,8 @@ defmodule Pleroma.Web.Websub.WebsubControllerTest do
   use Pleroma.Web.ConnCase
   import Pleroma.Factory
   alias Pleroma.Web.Websub.WebsubClientSubscription
-  alias Pleroma.{Repo, Activity, Instances}
+  alias Pleroma.Activity
+  alias Pleroma.Repo
   alias Pleroma.Web.Websub
 
   test "websub subscription request", %{conn: conn} do
@@ -80,27 +81,7 @@ defmodule Pleroma.Web.Websub.WebsubControllerTest do
 
       assert response(conn, 500) == "Error"
 
-      assert length(Repo.all(Activity)) == 0
-    end
-
-    test "it clears `unreachable` federation status of the sender", %{conn: conn} do
-      sender_url = "https://pleroma.soykaf.com"
-      Instances.set_unreachable(sender_url, Instances.reachability_datetime_threshold())
-      refute Instances.reachable?(sender_url)
-
-      websub = insert(:websub_client_subscription)
-      doc = "some stuff"
-      signature = Websub.sign(websub.secret, doc)
-
-      conn =
-        conn
-        |> put_req_header("x-hub-signature", "sha1=" <> signature)
-        |> put_req_header("content-type", "application/atom+xml")
-        |> put_req_header("referer", sender_url)
-        |> post("/push/subscriptions/#{websub.id}", doc)
-
-      assert response(conn, 200) == "OK"
-      assert Instances.reachable?(sender_url)
+      assert Enum.empty?(Repo.all(Activity))
     end
   end
 end