diff options
| author | Grant Ammons <gammons@gmail.com> | 2016-05-02 06:34:38 -0400 |
|---|---|---|
| committer | Grant Ammons <gammons@gmail.com> | 2016-05-02 06:34:38 -0400 |
| commit | 54e9313ad14269f57a13b32aac59aea17f86d151 (patch) | |
| tree | 9c6364af5e93d6b80df893d317894f60d6662940 /todolist/file_store_test.go | |
| parent | b1fc3359eb7498236621d1aa6a9ff18f8cce73c0 (diff) | |
Get completing todos to work correctly
Diffstat (limited to 'todolist/file_store_test.go')
| -rw-r--r-- | todolist/file_store_test.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/todolist/file_store_test.go b/todolist/file_store_test.go index d71c119..43b90d2 100644 --- a/todolist/file_store_test.go +++ b/todolist/file_store_test.go @@ -44,3 +44,12 @@ func TestDelete(t *testing.T) { store.Delete(1) assert.Equal(1, len(store.Data)) } + +func TestComplete(t *testing.T) { + assert := assert.New(t) + store := &FileStore{FileLocation: "todos.json"} + store.Load() + assert.Equal(false, store.FindById(1).Completed) + store.Complete(1) + assert.Equal(true, store.FindById(1).Completed) +} |
