Skip to content

Instantly share code, notes, and snippets.

@nicedawg
Created April 19, 2020 00:52
Show Gist options
  • Save nicedawg/f03b344103e4a4f66370fe668b8be576 to your computer and use it in GitHub Desktop.
Save nicedawg/f03b344103e4a4f66370fe668b8be576 to your computer and use it in GitHub Desktop.
[Beginning Rails 6] Listing 16-20. Fixing DraftArticlesMailerTest
require 'test_helper'
class DraftArticlesMailerTest < ActionMailer::TestCase
test "no_author" do
mail = DraftArticlesMailer.no_author('to@example.org')
assert_equal "Your email could not be processed", mail.subject
assert_equal ["to@example.org"], mail.to
assert_equal ["from@example.com"], mail.from
assert_match "Please check your draft articles email address and try again.", mail.body.encoded
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment