-
-
Save shankardevy/691b7f4dede5a8418673ddfa98c6aa73 to your computer and use it in GitHub Desktop.
This file contains 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 Mango.CRMTest do | |
use Mango.DataCase | |
alias Mango.CRM | |
alias Mango.CRM.Customer | |
test "build_customer/0 returns a customer changeset" do | |
assert %Ecto.Changeset{data: %Customer{}} = CRM.build_customer | |
end | |
test "build_customer/1 returns a customer changeset with values applied" do | |
attrs = %{"name" => "John"} | |
changeset = CRM.build_customer(attrs) | |
assert changeset.params == attrs | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment