diff options
Diffstat (limited to 'todolist/file_store_test.go')
| -rw-r--r-- | todolist/file_store_test.go | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/todolist/file_store_test.go b/todolist/file_store_test.go index 8bb23e0..3e10491 100644 --- a/todolist/file_store_test.go +++ b/todolist/file_store_test.go @@ -12,3 +12,16 @@ func TestFileStore(t *testing.T) { store.Load() assert.Equal(store.Data[0].Subject, "this is the first subject", "") } + +func TestSave(t *testing.T) { + store := &FileStore{FileLocation: "todos.json"} + store.Load() + store.Save() +} + +func TestNextId(t *testing.T) { + assert := assert.New(t) + store := &FileStore{FileLocation: "todos.json"} + store.Load() + assert.Equal(3, store.NextId()) +} |
