Last active
October 17, 2016 20:10
-
-
Save lasseebert/c6133a54e6fd2e79def45011bb7a2f1b 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.Users.InviteTest do | |
| use MyApp.ModelCase | |
| alias MyApp.Users.Invite | |
| alias MyApp.User | |
| test "it creates a user" do | |
| {:ok, user} = Invite.call(%{email: "alice@example.com"}) | |
| assert user.id > 0 | |
| assert user.email == "alice@example.com" | |
| assert (from u in User, select: count(u.id)) |> Repo.one == 1 | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment