Created
October 15, 2015 17:35
-
-
Save mzemel/04861157d971696f7630 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
test "/index returns a list of contacts" do | |
contacts_as_json = | |
%Contact{name: "Gumbo", phone: "(801) 555-5555"} | |
|> Repo.insert | |
|> List.wrap | |
|> Poison.encode! | |
response = conn(:get, "/api/contacts") |> send_request | |
assert response.status == 200 | |
assert response.resp_body == contacts_as_json | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment