Created
June 27, 2017 09:09
-
-
Save myobie/84e3cb70d828ab64ee78707dd6926197 to your computer and use it in GitHub Desktop.
How to use the todo.ex highlander object
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
| id = UUID.uuid4() | |
| {:ok, todo} = Todo.get id | |
| assert todo.completed == false | |
| assert todo.title == "" | |
| assert todo.color == :blue | |
| todo = %{todo | title: "Hello"} | |
| {:ok, _} = Todo.put id, todo | |
| # any amount of time later | |
| {:ok, todo} = Todo.get id | |
| assert todo.title == "Hello" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment