diff options
| author | Grant Ammons <gammons@gmail.com> | 2016-04-26 09:01:40 -0400 |
|---|---|---|
| committer | Grant Ammons <gammons@gmail.com> | 2016-04-26 09:01:40 -0400 |
| commit | e3213b3ef2c84387b66eeb731f5493c5e6da6a5d (patch) | |
| tree | 46b5ee148e7fd578d992f08ab89ba1d24a322d29 /todolist/file_store_test.go | |
| parent | a0f7203996439210b2a40663eeeeb8563ab03d68 (diff) | |
Get adding a todo working
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()) +} |
