Skip to content

Instantly share code, notes, and snippets.

@shankardevy
Last active August 18, 2017 05:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shankardevy/af2a6860143adbbce95e4ecba401e8b4 to your computer and use it in GitHub Desktop.
Save shankardevy/af2a6860143adbbce95e4ecba401e8b4 to your computer and use it in GitHub Desktop.
defmodule Mango.CatalogTest do
use ExUnit.Case
alias Mango.Catalog
alias Mango.Catalog.Product
test "list_products/0 returns all products" do
[p1, p2] = Catalog.list_products
assert %Product{} = p1
assert p1.name == "Tomato"
assert %Product{} = p2
assert p2.name == "Apple"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment