[#923] OAuthController#callback adjustments (with tests).
[akkoma] / test / web / websub / websub_controller_test.exs
index 6492df2a0b5c0167fbf3229c41c16e9e02bdebb3..1e69ed01a38ec6eca84d22c6524aaf999ac5c0df 100644 (file)
@@ -5,9 +5,10 @@
 defmodule Pleroma.Web.Websub.WebsubControllerTest do
   use Pleroma.Web.ConnCase
   import Pleroma.Factory
-  alias Pleroma.Web.Websub.WebsubClientSubscription
-  alias Pleroma.{Repo, Activity}
+  alias Pleroma.Activity
+  alias Pleroma.Repo
   alias Pleroma.Web.Websub
+  alias Pleroma.Web.Websub.WebsubClientSubscription
 
   test "websub subscription request", %{conn: conn} do
     user = insert(:user)
@@ -80,7 +81,7 @@ defmodule Pleroma.Web.Websub.WebsubControllerTest do
 
       assert response(conn, 500) == "Error"
 
-      assert length(Repo.all(Activity)) == 0
+      assert Enum.empty?(Repo.all(Activity))
     end
   end
 end