parent
f30859f991
commit
b3bc4bc411
6 changed files with 34 additions and 65 deletions
@ -1,11 +0,0 @@ |
||||
# Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html |
||||
|
||||
# This model initially had no columns defined. If you add columns to the |
||||
# model remove the "{}" from the fixture names and add the columns immediately |
||||
# below each fixture, per the syntax in the comments below |
||||
# |
||||
one: {} |
||||
# column: value |
||||
# |
||||
two: {} |
||||
# column: value |
@ -1,52 +0,0 @@ |
||||
require "test_helper" |
||||
|
||||
class NotificationMailerTest < ActionMailer::TestCase |
||||
test "expiration_in_60d" do |
||||
mail = NotificationMailer.expiration_in_60d |
||||
assert_equal "Expiration in 60d", mail.subject |
||||
assert_equal ["to@example.org"], mail.to |
||||
assert_equal ["from@example.com"], mail.from |
||||
assert_match "Hi", mail.body.encoded |
||||
end |
||||
|
||||
test "expiration_in_30d" do |
||||
mail = NotificationMailer.expiration_in_30d |
||||
assert_equal "Expiration in 30d", mail.subject |
||||
assert_equal ["to@example.org"], mail.to |
||||
assert_equal ["from@example.com"], mail.from |
||||
assert_match "Hi", mail.body.encoded |
||||
end |
||||
|
||||
test "expired" do |
||||
mail = NotificationMailer.expired |
||||
assert_equal "Expired", mail.subject |
||||
assert_equal ["to@example.org"], mail.to |
||||
assert_equal ["from@example.com"], mail.from |
||||
assert_match "Hi", mail.body.encoded |
||||
end |
||||
|
||||
test "expired_30d_ago" do |
||||
mail = NotificationMailer.expired_30d_ago |
||||
assert_equal "Expired 30d ago", mail.subject |
||||
assert_equal ["to@example.org"], mail.to |
||||
assert_equal ["from@example.com"], mail.from |
||||
assert_match "Hi", mail.body.encoded |
||||
end |
||||
|
||||
test "expired_60d_ago" do |
||||
mail = NotificationMailer.expired_60d_ago |
||||
assert_equal "Expired 60d ago", mail.subject |
||||
assert_equal ["to@example.org"], mail.to |
||||
assert_equal ["from@example.com"], mail.from |
||||
assert_match "Hi", mail.body.encoded |
||||
end |
||||
|
||||
test "cancelled" do |
||||
mail = NotificationMailer.cancelled |
||||
assert_equal "Cancelled", mail.subject |
||||
assert_equal ["to@example.org"], mail.to |
||||
assert_equal ["from@example.com"], mail.from |
||||
assert_match "Hi", mail.body.encoded |
||||
end |
||||
|
||||
end |
Loading…
Reference in new issue