Add optional welcome message.
This commit is contained in:
parent
1ce1b7b58d
commit
d812a347ca
5 changed files with 58 additions and 1 deletions
|
|
@ -196,6 +196,25 @@ defmodule Pleroma.UserTest do
|
|||
|
||||
assert User.following?(registered_user, user)
|
||||
refute User.following?(registered_user, remote_user)
|
||||
|
||||
Pleroma.Config.put([:instance, :autofollowed_nicknames], [])
|
||||
end
|
||||
|
||||
test "it sends a welcome message if it is set" do
|
||||
welcome_user = insert(:user)
|
||||
|
||||
Pleroma.Config.put([:instance, :welcome_user_nickname], welcome_user.nickname)
|
||||
Pleroma.Config.put([:instance, :welcome_message], "Hello, this is a cool site")
|
||||
|
||||
cng = User.register_changeset(%User{}, @full_user_data)
|
||||
{:ok, registered_user} = User.register(cng)
|
||||
|
||||
activity = Repo.one(Pleroma.Activity)
|
||||
assert registered_user.ap_id in activity.recipients
|
||||
assert activity.data["object"]["content"] =~ "cool site"
|
||||
|
||||
Pleroma.Config.put([:instance, :welcome_user_nickname], nil)
|
||||
Pleroma.Config.put([:instance, :welcome_message], nil)
|
||||
end
|
||||
|
||||
test "it requires an email, name, nickname and password, bio is optional" do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue