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:
@@ -21,11 +21,11 @@ class TicketMailerTest < ActionMailer::TestCase
|
||||
email.deliver_now
|
||||
end
|
||||
|
||||
assert_equal ["no-reply@aperonight.fr"], email.from
|
||||
assert_equal [@user.email], email.to
|
||||
assert_equal [ "no-reply@aperonight.fr" ], email.from
|
||||
assert_equal [ @user.email ], email.to
|
||||
assert_equal "Confirmation d'achat - #{@event.name}", email.subject
|
||||
assert_match @event.name, email.body.to_s
|
||||
assert_match @user.email.split('@').first, email.body.to_s
|
||||
assert_match @user.email.split("@").first, email.body.to_s
|
||||
end
|
||||
|
||||
test "purchase confirmation single ticket email" do
|
||||
@@ -38,11 +38,11 @@ class TicketMailerTest < ActionMailer::TestCase
|
||||
email.deliver_now
|
||||
end
|
||||
|
||||
assert_equal ["no-reply@aperonight.fr"], email.from
|
||||
assert_equal [@ticket.user.email], email.to
|
||||
assert_equal [ "no-reply@aperonight.fr" ], email.from
|
||||
assert_equal [ @ticket.user.email ], email.to
|
||||
assert_equal "Confirmation d'achat - #{@ticket.event.name}", email.subject
|
||||
assert_match @ticket.event.name, email.body.to_s
|
||||
assert_match @ticket.user.email.split('@').first, email.body.to_s
|
||||
assert_match @ticket.user.email.split("@").first, email.body.to_s
|
||||
end
|
||||
|
||||
test "event reminder email one week before" do
|
||||
@@ -56,8 +56,8 @@ class TicketMailerTest < ActionMailer::TestCase
|
||||
email.deliver_now
|
||||
end
|
||||
|
||||
assert_equal ["no-reply@aperonight.fr"], email.from
|
||||
assert_equal [@user.email], email.to
|
||||
assert_equal [ "no-reply@aperonight.fr" ], email.from
|
||||
assert_equal [ @user.email ], email.to
|
||||
assert_equal "Rappel : #{@event.name} dans une semaine", email.subject
|
||||
assert_match "une semaine", email.body.to_s
|
||||
assert_match @event.name, email.body.to_s
|
||||
@@ -101,4 +101,4 @@ class TicketMailerTest < ActionMailer::TestCase
|
||||
assert_equal "Rappel : #{@event.name} dans 3 jours", email.subject
|
||||
assert_match "3 jours", email.body.to_s
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user