Make Mastodon follow hack more explicit.
[akkoma] / test / web / common_api / common_api_utils_test.exs
index d59864c4352152246a280016ee38865e28c8794a..f39472ee33b1dc309423fc2a8a10dcd6fab04fca 100644 (file)
@@ -18,21 +18,15 @@ defmodule Pleroma.Web.CommonAPI.UtilsTest do
   end
 
   describe "it confirms the password given is the current users password" do
-    test "with no credentials" do
-      assert Utils.confirm_current_password(nil, %{"password" => "test"}) ==
-               {:error, "Invalid credentials."}
-    end
-
-    test "with incorrect password given" do
+    test "incorrect password given" do
       {:ok, user} = UserBuilder.insert()
 
-      assert Utils.confirm_current_password(user, %{"password" => ""}) ==
-               {:error, "Invalid password."}
+      assert Utils.confirm_current_password(user, "") == {:error, "Invalid password."}
     end
 
-    test "with correct password given" do
+    test "correct password given" do
       {:ok, user} = UserBuilder.insert()
-      assert Utils.confirm_current_password(user, %{"password" => "test"}) == {:ok, user}
+      assert Utils.confirm_current_password(user, "test") == {:ok, user}
     end
   end
 end