fix: use string budget in email service instead of float

The budget field is stored as a string (e.g., '$25-50'), not a number.
Updated EmailService.send_registration_confirmation() to accept budget
as a string and display it directly in the email.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2025-12-22 17:56:59 -07:00
parent 37d50e328d
commit 5a9f0d552a
3 changed files with 6 additions and 6 deletions

View File

@@ -167,7 +167,7 @@ class TestEmailService:
magic_link_url="https://example.com/magic/abc123",
exchange_name="Secret Santa 2025",
exchange_description="Annual office Secret Santa",
budget_amount=50,
budget="$25-50",
gift_exchange_date="2025-12-20",
)
@@ -179,7 +179,7 @@ class TestEmailService:
assert "John Doe" in call_args["html_body"]
assert "https://example.com/magic/abc123" in call_args["html_body"]
assert "Annual office Secret Santa" in call_args["html_body"]
assert "$50" in call_args["html_body"]
assert "$25-50" in call_args["html_body"]
assert "2025-12-20" in call_args["html_body"]
def test_dev_mode_logs_magic_link_url(self, app, caplog):