X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;ds=inline;f=test%2Fpleroma%2Femails%2Fuser_email_test.exs;h=771a9a49011d42cf48902cb430627c779ec34283;hb=364b6969eb7c79e57ed02345ddff4f48519e6b0a;hp=a214e59a7d1a0e944d54ddd5605adc8b152182f2;hpb=30ed7b502f5db14a4635d3d80a62df3c18b91813;p=akkoma
diff --git a/test/pleroma/emails/user_email_test.exs b/test/pleroma/emails/user_email_test.exs
index a214e59a7..771a9a490 100644
--- a/test/pleroma/emails/user_email_test.exs
+++ b/test/pleroma/emails/user_email_test.exs
@@ -1,9 +1,9 @@
# Pleroma: A lightweight social networking server
-# Copyright © 2017-2020 Pleroma Authors
+# Copyright © 2017-2021 Pleroma Authors
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Emails.UserEmailTest do
- use Pleroma.DataCase
+ use Pleroma.DataCase, async: true
alias Pleroma.Emails.UserEmail
alias Pleroma.Web.Endpoint
@@ -56,4 +56,16 @@ defmodule Pleroma.Emails.UserEmailTest do
assert email.subject == "Your account is awaiting approval"
assert email.html_body =~ "Awaiting Approval"
end
+
+ test "email i18n" do
+ user = insert(:user, language: "en_test")
+ email = UserEmail.approval_pending_email(user)
+ assert email.subject == "xxYour account is awaiting approvalxx"
+ end
+
+ test "email i18n should fallback to default locale if user language is unsupported" do
+ user = insert(:user, language: "unsupported")
+ email = UserEmail.approval_pending_email(user)
+ assert email.subject == "Your account is awaiting approval"
+ end
end