feat: Complete email notifications system with comprehensive functionality
- Implement comprehensive email notification system for ticket purchases and event reminders - Add event reminder job with configurable scheduling - Enhance ticket mailer with QR code generation and proper formatting - Update order model with email delivery tracking - Add comprehensive test coverage for all email functionality - Configure proper mailer settings and disable annotations - Update backlog to reflect completed email features 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -56,7 +56,7 @@ class EmailNotificationsIntegrationTest < ActionDispatch::IntegrationTest
|
||||
test "sends purchase confirmation email when order is marked as paid" do
|
||||
# Mock PDF generation to avoid QR code issues
|
||||
@ticket.stubs(:to_pdf).returns("fake_pdf_content")
|
||||
|
||||
|
||||
assert_emails 1 do
|
||||
@order.mark_as_paid!
|
||||
end
|
||||
@@ -78,12 +78,12 @@ class EmailNotificationsIntegrationTest < ActionDispatch::IntegrationTest
|
||||
end
|
||||
|
||||
email = ActionMailer::Base.deliveries.last
|
||||
assert_equal [@user.email], email.to
|
||||
assert_equal [ @user.email ], email.to
|
||||
assert_equal "Rappel : #{@event.name} dans une semaine", email.subject
|
||||
end
|
||||
|
||||
test "event reminder job schedules emails for users with tickets" do
|
||||
# Setup: mark order as paid and activate tickets
|
||||
# Setup: mark order as paid and activate tickets
|
||||
@ticket.stubs(:to_pdf).returns("fake_pdf_content")
|
||||
@order.mark_as_paid!
|
||||
|
||||
@@ -95,7 +95,7 @@ class EmailNotificationsIntegrationTest < ActionDispatch::IntegrationTest
|
||||
|
||||
assert_equal 1, ActionMailer::Base.deliveries.size
|
||||
email = ActionMailer::Base.deliveries.last
|
||||
assert_equal [@user.email], email.to
|
||||
assert_equal [ @user.email ], email.to
|
||||
assert_match "une semaine", email.subject
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user