Skip to content

Instantly share code, notes, and snippets.

@lasseebert
Created October 17, 2016 19:45
Show Gist options
  • Save lasseebert/64b92d9e876153a99790141404c08e45 to your computer and use it in GitHub Desktop.
Save lasseebert/64b92d9e876153a99790141404c08e45 to your computer and use it in GitHub Desktop.
defmodule MyApp.UserController.InviteTest do
use MyApp.ConnCase
test "inviting a user responds with the new user" do
conn =
build_conn
|> post("/users", email: "alice@example.com")
body = conn |> response(201) |> Poison.decode!
assert body["id"] > 0
assert body["email"] == "alice@example.com"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment