giant massive dep upgrade and dialyxir-found error emporium (#371)
[akkoma] / test / pleroma / web / pleroma_api / controllers / two_factor_authentication_controller_test.exs
index 8d4e0104af482a80df12373690eb92c39dac5d3f..3716fcdec41ac5e0e7e334e15f3947db5ec8eedf 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.PleromaAPI.TwoFactorAuthenticationControllerTest do
@@ -151,7 +151,10 @@ defmodule Pleroma.Web.PleromaAPI.TwoFactorAuthenticationControllerTest do
 
       assert conn
              |> put_req_header("authorization", "Bearer #{token.token}")
-             |> post("/api/pleroma/accounts/mfa/confirm/totp", %{password: "test", code: code})
+             |> post("/api/pleroma/accounts/mfa/confirm/totp", %{
+               password: "test",
+               code: code
+             })
              |> json_response(:ok)
 
       settings = refresh_record(user).multi_factor_authentication_settings
@@ -162,7 +165,10 @@ defmodule Pleroma.Web.PleromaAPI.TwoFactorAuthenticationControllerTest do
 
       assert conn
              |> put_req_header("authorization", "Bearer #{token2.token}")
-             |> post("/api/pleroma/accounts/mfa/confirm/totp", %{password: "test", code: code})
+             |> post("/api/pleroma/accounts/mfa/confirm/totp", %{
+               password: "test",
+               code: code
+             })
              |> json_response(403) == %{
                "error" => "Insufficient permissions: write:security."
              }
@@ -185,7 +191,10 @@ defmodule Pleroma.Web.PleromaAPI.TwoFactorAuthenticationControllerTest do
       response =
         conn
         |> put_req_header("authorization", "Bearer #{token.token}")
-        |> post("/api/pleroma/accounts/mfa/confirm/totp", %{password: "xxx", code: code})
+        |> post("/api/pleroma/accounts/mfa/confirm/totp", %{
+          password: "xxx",
+          code: code
+        })
         |> json_response(422)
 
       settings = refresh_record(user).multi_factor_authentication_settings
@@ -212,7 +221,10 @@ defmodule Pleroma.Web.PleromaAPI.TwoFactorAuthenticationControllerTest do
       response =
         conn
         |> put_req_header("authorization", "Bearer #{token.token}")
-        |> post("/api/pleroma/accounts/mfa/confirm/totp", %{password: "test", code: "code"})
+        |> post("/api/pleroma/accounts/mfa/confirm/totp", %{
+          password: "test",
+          code: "code"
+        })
         |> json_response(422)
 
       settings = refresh_record(user).multi_factor_authentication_settings
@@ -223,7 +235,10 @@ defmodule Pleroma.Web.PleromaAPI.TwoFactorAuthenticationControllerTest do
 
       assert conn
              |> put_req_header("authorization", "Bearer #{token2.token}")
-             |> post("/api/pleroma/accounts/mfa/confirm/totp", %{password: "test", code: "code"})
+             |> post("/api/pleroma/accounts/mfa/confirm/totp", %{
+               password: "test",
+               code: "code"
+             })
              |> json_response(403) == %{
                "error" => "Insufficient permissions: write:security."
              }