from app.services.email_templates import build_employee_invitation_email def test_employee_invitation_uses_token_link_not_password(): subject, body_text, body_html = build_employee_invitation_email( member_first_name="Anurag", member_email="anurag@road.rentals", manager_name="Suyash Dixit", company_domain="road.rentals", invite_url="https://gentic.email/invite/test-token", expires_hours=48, ) assert subject == "Suyash Dixit invited you to join road.rentals" assert "password" not in body_text.lower() assert "Sign-in credentials" not in body_text assert "https://gentic.email/invite/test-token" in body_text assert "expires in 48 hours" in body_text assert "safely ignore this email" in body_text assert "Set up your account" in body_html assert "test-token" in body_html assert "Initial password" not in body_html assert "unsubscribe" not in body_html.lower()