Registration tests
This commit is contained in:
parent
28005563f0
commit
521e965884
3 changed files with 23 additions and 5 deletions
|
|
@ -517,6 +517,22 @@ defmodule Pleroma.UserTest do
|
|||
|> assert_email_sent()
|
||||
end
|
||||
|
||||
test "sends a pending approval email" do
|
||||
clear_config([:instance, :account_approval_required], true)
|
||||
|
||||
{:ok, user} =
|
||||
User.register_changeset(%User{}, @full_user_data)
|
||||
|> User.register()
|
||||
|
||||
ObanHelpers.perform_all()
|
||||
|
||||
assert_email_sent(
|
||||
from: Pleroma.Config.Helpers.sender(),
|
||||
to: {user.name, user.email},
|
||||
subject: "Your account is awaiting approval"
|
||||
)
|
||||
end
|
||||
|
||||
test "it requires an email, name, nickname and password, bio is optional when account_activation_required is enabled" do
|
||||
Pleroma.Config.put([:instance, :account_activation_required], true)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue