Skip to content

Instantly share code, notes, and snippets.

@shankardevy

shankardevy/sales_test.exs Secret

Last active Jul 8, 2017
Embed
What would you like to do?
defmodule Mango.SalesTest do
use Mango.DataCase
alias Mango.Sales
alias Mango.Sales.Order
test "create_cart" do
assert %Order{status: "In Cart"} = Sales.create_cart
end
test "get_cart/1" do
cart1 = Sales.create_cart
cart2 = Sales.get_cart(cart1.id)
assert cart1.id == cart2.id
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment