From d8d4510d2faebff633d6e98fa4812f2461ae85b6 Mon Sep 17 00:00:00 2001 From: Grant Ammons Date: Sun, 12 Jun 2016 09:49:38 -0400 Subject: Refactor todolist stuff out of the file store implementation --- todolist/grouper_test.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'todolist/grouper_test.go') diff --git a/todolist/grouper_test.go b/todolist/grouper_test.go index 0b610f0..4b79703 100644 --- a/todolist/grouper_test.go +++ b/todolist/grouper_test.go @@ -10,10 +10,11 @@ func TestGroupByContext(t *testing.T) { assert := assert.New(t) store := &FileStore{FileLocation: "todos.json"} - store.Load() + list := &TodoList{} + list.Load(store.Load()) grouper := &Grouper{} - grouped := grouper.GroupByContext(store.Todos()) + grouped := grouper.GroupByContext(list.Todos()) assert.Equal(2, len(grouped.Groups["root"]), "") assert.Equal(1, len(grouped.Groups["more"]), "") @@ -23,10 +24,11 @@ func TestGroupByProject(t *testing.T) { assert := assert.New(t) store := &FileStore{FileLocation: "todos.json"} - store.Load() + list := &TodoList{} + list.Load(store.Load()) grouper := &Grouper{} - grouped := grouper.GroupByProject(store.Todos()) + grouped := grouper.GroupByProject(list.Todos()) assert.Equal(2, len(grouped.Groups["test1"]), "") } -- cgit v1.3