Merge remote-tracking branch 'upstream/develop' into by-approval
This commit is contained in:
commit
6931dbfa58
242 changed files with 2000 additions and 2867 deletions
|
|
@ -17,6 +17,7 @@ defmodule Pleroma.UserTest do
|
|||
|
||||
import Pleroma.Factory
|
||||
import ExUnit.CaptureLog
|
||||
import Swoosh.TestAssertions
|
||||
|
||||
setup_all do
|
||||
Tesla.Mock.mock_global(fn env -> apply(HttpRequestMock, :request, [env]) end)
|
||||
|
|
@ -385,9 +386,11 @@ defmodule Pleroma.UserTest do
|
|||
password_confirmation: "test",
|
||||
email: "email@example.com"
|
||||
}
|
||||
|
||||
setup do: clear_config([:instance, :autofollowed_nicknames])
|
||||
setup do: clear_config([:instance, :welcome_message])
|
||||
setup do: clear_config([:instance, :welcome_user_nickname])
|
||||
setup do: clear_config([:instance, :account_activation_required])
|
||||
|
||||
test "it autofollows accounts that are set for it" do
|
||||
user = insert(:user)
|
||||
|
|
@ -421,7 +424,14 @@ defmodule Pleroma.UserTest do
|
|||
assert activity.actor == welcome_user.ap_id
|
||||
end
|
||||
|
||||
setup do: clear_config([:instance, :account_activation_required])
|
||||
test "it sends a confirm email" do
|
||||
Pleroma.Config.put([:instance, :account_activation_required], true)
|
||||
|
||||
cng = User.register_changeset(%User{}, @full_user_data)
|
||||
{:ok, registered_user} = User.register(cng)
|
||||
ObanHelpers.perform_all()
|
||||
assert_email_sent(Pleroma.Emails.UserEmail.account_confirmation_email(registered_user))
|
||||
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