diff options
| author | Grant Ammons <gammons@gmail.com> | 2016-05-02 07:25:51 -0400 |
|---|---|---|
| committer | Grant Ammons <gammons@gmail.com> | 2016-05-02 07:25:51 -0400 |
| commit | 34c89ec2ca4b458adb94534c4fae44c921181f59 (patch) | |
| tree | ed3b9e7ab295543938ac4ee2fcadbe915749dd98 /todolist/file_store_test.go | |
| parent | 54e9313ad14269f57a13b32aac59aea17f86d151 (diff) | |
Uncomplete todo
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 43b90d2..8817362 100644 --- a/todolist/file_store_test.go +++ b/todolist/file_store_test.go @@ -53,3 +53,12 @@ func TestComplete(t *testing.T) { store.Complete(1) assert.Equal(true, store.FindById(1).Completed) } + +func TestUncomplete(t *testing.T) { + assert := assert.New(t) + store := &FileStore{FileLocation: "todos.json"} + store.Load() + assert.Equal(true, store.FindById(2).Completed) + store.Uncomplete(2) + assert.Equal(false, store.FindById(2).Completed) +} |
