Make open source
This commit is contained in:
0
test/mailers/.keep
Normal file
0
test/mailers/.keep
Normal file
7
test/mailers/guest_mailer_test.rb
Normal file
7
test/mailers/guest_mailer_test.rb
Normal file
@ -0,0 +1,7 @@
|
||||
require 'test_helper'
|
||||
|
||||
class GuestMailerTest < ActionMailer::TestCase
|
||||
# test "the truth" do
|
||||
# assert true
|
||||
# end
|
||||
end
|
28
test/mailers/previews/guest_mailer_preview.rb
Normal file
28
test/mailers/previews/guest_mailer_preview.rb
Normal file
@ -0,0 +1,28 @@
|
||||
# Preview all emails at http://localhost:3000/rails/mailers/guest_mailer
|
||||
class GuestMailerPreview < ActionMailer::Preview
|
||||
def confirmation_email_attending
|
||||
GuestMailer.confirmation_email(
|
||||
Guest.new(
|
||||
id: 123,
|
||||
first_name: 'John',
|
||||
last_name: 'Doe',
|
||||
email: 'john.doe@example.com',
|
||||
token: 'abcdefghiklmnop',
|
||||
attending: true
|
||||
)
|
||||
)
|
||||
end
|
||||
|
||||
def confirmation_email_attending_not_attending
|
||||
GuestMailer.confirmation_email(
|
||||
Guest.new(
|
||||
id: 123,
|
||||
first_name: 'John',
|
||||
last_name: 'Doe',
|
||||
email: 'john.doe@example.com',
|
||||
token: 'abcdefghiklmnop',
|
||||
attending: false
|
||||
)
|
||||
)
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user