X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=test%2Fpleroma%2Fweb%2Fpleroma_api%2Fcontrollers%2Ftwo_factor_authentication_controller_test.exs;h=3716fcdec41ac5e0e7e334e15f3947db5ec8eedf;hb=07a48b9293e4046c50b5d424d60a1bf16c7cc198;hp=24074f4e5415ad45b63e618d91bc2b8ee73ce165;hpb=7f4d218cffaafd97d9a5fe636a1acef7ca1053d8;p=akkoma diff --git a/test/pleroma/web/pleroma_api/controllers/two_factor_authentication_controller_test.exs b/test/pleroma/web/pleroma_api/controllers/two_factor_authentication_controller_test.exs index 24074f4e5..3716fcdec 100644 --- a/test/pleroma/web/pleroma_api/controllers/two_factor_authentication_controller_test.exs +++ b/test/pleroma/web/pleroma_api/controllers/two_factor_authentication_controller_test.exs @@ -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." }