mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2024-12-23 08:36:29 +00:00
Lint, fix test
This commit is contained in:
parent
520dce857e
commit
f43518eb74
3 changed files with 12 additions and 5 deletions
|
@ -1553,8 +1553,12 @@ defmodule Pleroma.User do
|
|||
status = account_status(user)
|
||||
|
||||
case status do
|
||||
:confirmation_pending -> delete_and_invalidate_cache(user)
|
||||
:approval_pending -> delete_and_invalidate_cache(user)
|
||||
:confirmation_pending ->
|
||||
delete_and_invalidate_cache(user)
|
||||
|
||||
:approval_pending ->
|
||||
delete_and_invalidate_cache(user)
|
||||
|
||||
_ ->
|
||||
user
|
||||
|> change(%{deactivated: true, email: nil})
|
||||
|
|
|
@ -572,7 +572,10 @@ defmodule Pleroma.UserTest do
|
|||
|
||||
params =
|
||||
@full_user_data
|
||||
|> Map.put(:registration_reason, "Quia et nesciunt dolores numquam ipsam nisi sapiente soluta. Ullam repudiandae nisi quam porro officiis officiis ad. Consequatur animi velit ex quia. Odit voluptatem perferendis quia ut nisi. Dignissimos sit soluta atque aliquid dolorem ut dolorum ut. Labore voluptates iste iusto amet voluptatum earum. Ad fugit illum nam eos ut nemo. Pariatur ea fuga non aspernatur. Dignissimos debitis officia corporis est nisi ab et. Atque itaque alias eius voluptas minus. Accusamus numquam tempore occaecati in.")
|
||||
|> Map.put(
|
||||
:registration_reason,
|
||||
"Quia et nesciunt dolores numquam ipsam nisi sapiente soluta. Ullam repudiandae nisi quam porro officiis officiis ad. Consequatur animi velit ex quia. Odit voluptatem perferendis quia ut nisi. Dignissimos sit soluta atque aliquid dolorem ut dolorum ut. Labore voluptates iste iusto amet voluptatum earum. Ad fugit illum nam eos ut nemo. Pariatur ea fuga non aspernatur. Dignissimos debitis officia corporis est nisi ab et. Atque itaque alias eius voluptas minus. Accusamus numquam tempore occaecati in."
|
||||
)
|
||||
|
||||
changeset = User.register_changeset(%User{}, params)
|
||||
|
||||
|
|
|
@ -1017,7 +1017,7 @@ defmodule Pleroma.Web.MastodonAPI.AccountControllerTest do
|
|||
password: "PlzDontHackLain",
|
||||
bio: "Test Bio",
|
||||
agreement: true,
|
||||
reason: "I'm a cool dude, bro"
|
||||
reason: "I am a cool dude, bro"
|
||||
})
|
||||
|
||||
%{
|
||||
|
@ -1035,7 +1035,7 @@ defmodule Pleroma.Web.MastodonAPI.AccountControllerTest do
|
|||
assert token_from_db.user.confirmation_pending
|
||||
assert token_from_db.user.approval_pending
|
||||
|
||||
assert token_from_db.user.registration_reason == "I'm a cool dude, bro"
|
||||
assert token_from_db.user.registration_reason == "I am a cool dude, bro"
|
||||
end
|
||||
|
||||
test "returns error when user already registred", %{conn: conn, valid_params: valid_params} do
|
||||
|
|
Loading…
Reference in a new issue