projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
giant massive dep upgrade and dialyxir-found error emporium (#371)
[akkoma]
/
test
/
pleroma
/
web
/
pleroma_api
/
controllers
/
two_factor_authentication_controller_test.exs
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 24074f4e5415ad45b63e618d91bc2b8ee73ce165..3716fcdec41ac5e0e7e334e15f3947db5ec8eedf 100644
(file)
--- 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}")
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
|> 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}")
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."
}
|> 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}")
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
|> 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}")
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
|> 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}")
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."
}
|> json_response(403) == %{
"error" => "Insufficient permissions: write:security."
}