This commit is contained in:
Egor Kislitsyn 2020-09-23 20:23:11 +04:00
parent 8baee855d9
commit f1e4333dd7
No known key found for this signature in database
GPG Key ID: 1B49CB15B71E7805
2 changed files with 10 additions and 2 deletions

View File

@ -67,7 +67,12 @@ test "it process a backup record" do
assert {:ok, backup} = perform_job(BackupWorker, delete_job_args) assert {:ok, backup} = perform_job(BackupWorker, delete_job_args)
refute Backup.get(backup_id) refute Backup.get(backup_id)
assert_email_sent(Pleroma.Emails.UserEmail.backup_is_ready_email(backup)) email = Pleroma.Emails.UserEmail.backup_is_ready_email(backup)
assert_email_sent(
to: {user.name, user.email},
html_body: email.html_body
)
end end
test "it removes outdated backups after creating a fresh one" do test "it removes outdated backups after creating a fresh one" do

View File

@ -2042,7 +2042,10 @@ test "it creates a backup", %{conn: conn} do
ObanHelpers.perform_all() ObanHelpers.perform_all()
assert_email_sent(Pleroma.Emails.UserEmail.backup_is_ready_email(backup, admin.id)) email = Pleroma.Emails.UserEmail.backup_is_ready_email(backup, admin.id)
assert String.contains?(email.html_body, "Admin @#{admin.nickname} requested a full backup")
assert_email_sent(to: {user.name, user.email}, html_body: email.html_body)
end end
test "it doesn't limit admins", %{conn: conn} do test "it doesn't limit admins", %{conn: conn} do