agentic.email/backend/tests/test_email_templates.py
2026-10-04 21:02:19 +05:30

32 lines
1.1 KiB
Python

from app.services.email_templates import build_employee_invitation_email
def test_employee_invitation_uses_gentic_branding():
subject, body_text, body_html = build_employee_invitation_email(
member_first_name="Anurag",
member_email="anurag@road.rentals",
manager_name="Suyash Dixit",
manager_email="suyash@road.rentals",
company_domain="road.rentals",
login_url="https://gentic.email/login",
initial_password="Roadrentals123",
force_password_change=True,
)
assert "aGentic Email" in subject
assert subject == (
"Account invitation: Suyash Dixit added you to road.rentals on aGentic Email"
)
assert "AGMail" not in subject
assert "Suyash Dixit" in subject
assert "road.rentals" in subject
assert "Gentic Email" in body_text
assert "AGMail" not in body_text
assert "Suyash Dixit has created a work email account" in body_text
assert "anurag@road.rentals" in body_text
assert "gentic.email" in body_html
assert "Organization invitation" in body_html
assert "Sign in to aGentic Email" in body_html
assert "AGMail" not in body_html