diff options
author | Alex Gleason <alex@alexgleason.me> | 2020-10-11 21:38:01 -0500 |
---|---|---|
committer | Alex Gleason <alex@alexgleason.me> | 2020-10-11 21:38:01 -0500 |
commit | 521e965884d916c21d76ff12544e678b7fcdb1d4 (patch) | |
tree | f13653931b23d3f509bd9794fe24329ec42c55e3 /test | |
parent | 28005563f00028981cf516cceb16c2b55bd0e97c (diff) | |
download | pleroma-521e965884d916c21d76ff12544e678b7fcdb1d4.tar.gz pleroma-521e965884d916c21d76ff12544e678b7fcdb1d4.zip |
Registration tests
Diffstat (limited to 'test')
-rw-r--r-- | test/user_test.exs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/user_test.exs b/test/user_test.exs index d506f7047..2d3a6564b 100644 --- a/test/user_test.exs +++ b/test/user_test.exs @@ -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) |