Fixed issue with confirmation email not sending when signup-approval was enabled

This commit is contained in:
Agate 2020-04-20 15:42:29 +02:00
commit a20a63d6ed
No known key found for this signature in database
GPG key ID: 6B501DFD73514E14
2 changed files with 15 additions and 1 deletions

View file

@ -418,7 +418,9 @@ def test_username_with_existing_local_account_are_invalid(
assert "username" in response.data
def test_signup_with_approval_enabled(preferences, factories, api_client, mocker):
def test_signup_with_approval_enabled(
preferences, factories, api_client, mocker, mailoutbox, settings
):
url = reverse("rest_register")
data = {
"username": "test1",
@ -455,6 +457,10 @@ def test_signup_with_approval_enabled(preferences, factories, api_client, mocker
new_status="pending",
)
confirmation_message = mailoutbox[-1]
assert "confirm" in confirmation_message.body
assert settings.FUNKWHALE_HOSTNAME in confirmation_message.body
def test_signup_with_approval_enabled_validation_error(
preferences, factories, api_client