Created
October 21, 2016 20:37
-
-
Save lasseebert/e8835f67614df6b51a7dcf7c0d50c4fc to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| defmodule MyApp.MailerTest do | |
| use ExUnit.Case | |
| test "it uses mock in tests" do | |
| MyApp.Mailer.Mock.clear | |
| MyApp.Mailer.send_test_mail("me@example.com") | |
| assert MyApp.Mailer.Mock.mails |> length == 1 | |
| [mail] = MyApp.Mailer.Mock.mails | |
| assert mail.to == "me@example.com" | |
| assert mail.text == "Test from MyApp" | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment