From e3213b3ef2c84387b66eeb731f5493c5e6da6a5d Mon Sep 17 00:00:00 2001 From: Grant Ammons Date: Tue, 26 Apr 2016 09:01:40 -0400 Subject: Get adding a todo working --- todolist/file_store_test.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'todolist/file_store_test.go') 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()) +} -- cgit v1.3