Added the ability to upload background, logo, default user avatar, instance thumbnail, and the NSFW hiding image via AdminFE
This commit is contained in:
parent
42b06d78df
commit
b7fc61e17b
7 changed files with 48 additions and 7 deletions
|
|
@ -1777,4 +1777,16 @@ defmodule Pleroma.UserTest do
|
|||
assert result.email_notifications["digest"] == false
|
||||
end
|
||||
end
|
||||
|
||||
test "avatar fallback" do
|
||||
user = insert(:user)
|
||||
assert User.avatar_url(user) =~ "/images/avi.png"
|
||||
|
||||
Pleroma.Config.put([:assets, :default_user_avatar], "avatar.png")
|
||||
|
||||
user = User.get_cached_by_nickname_or_id(user.nickname)
|
||||
assert User.avatar_url(user) =~ "avatar.png"
|
||||
|
||||
assert User.avatar_url(user, no_default: true) == nil
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ defmodule Pleroma.Workers.Cron.NewUsersDigestWorkerTest do
|
|||
assert email.html_body =~ user.nickname
|
||||
assert email.html_body =~ user2.nickname
|
||||
assert email.html_body =~ "cofe"
|
||||
assert email.html_body =~ "#{Pleroma.Web.Endpoint.url()}/static/logo.png"
|
||||
end
|
||||
|
||||
test "it doesn't fail when admin has no email" do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue