aboutsummaryrefslogtreecommitdiffstats
path: root/todolist/file_store_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'todolist/file_store_test.go')
-rw-r--r--todolist/file_store_test.go9
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)
+}