diff options
author | eugenijm <eugenijm@protonmail.com> | 2020-04-12 22:54:43 +0300 |
---|---|---|
committer | eugenijm <eugenijm@protonmail.com> | 2020-05-21 04:41:42 +0300 |
commit | b7fc61e17b995e3aa4e52f85b91d320a1cd1e106 (patch) | |
tree | 2b361619e710819c511b986804e6e92ac8664c15 /test | |
parent | 42b06d78dfc9cec2a31bcb4676cc0135863ca97d (diff) | |
download | pleroma-b7fc61e17b995e3aa4e52f85b91d320a1cd1e106.tar.gz |
Added the ability to upload background, logo, default user avatar, instance thumbnail, and the NSFW hiding image via AdminFE
Diffstat (limited to 'test')
-rw-r--r-- | test/user_test.exs | 12 | ||||
-rw-r--r-- | test/workers/cron/new_users_digest_worker_test.exs | 1 |
2 files changed, 13 insertions, 0 deletions
diff --git a/test/user_test.exs b/test/user_test.exs index 863e0106c..ea192ad10 100644 --- a/test/user_test.exs +++ b/test/user_test.exs @@ -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 diff --git a/test/workers/cron/new_users_digest_worker_test.exs b/test/workers/cron/new_users_digest_worker_test.exs index 54cf0ca46..ee589bb55 100644 --- a/test/workers/cron/new_users_digest_worker_test.exs +++ b/test/workers/cron/new_users_digest_worker_test.exs @@ -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 |