diff options
| author | Grant Ammons <gammons@gmail.com> | 2016-06-12 09:49:38 -0400 |
|---|---|---|
| committer | Grant Ammons <gammons@gmail.com> | 2016-06-12 09:49:38 -0400 |
| commit | d8d4510d2faebff633d6e98fa4812f2461ae85b6 (patch) | |
| tree | be474ce669a994767867f2224d8cdd4103271aee /todolist/grouper_test.go | |
| parent | fd9121e03c18c7dfd947e98ea4cec545f110a804 (diff) | |
Refactor todolist stuff out of the file store implementation
Diffstat (limited to 'todolist/grouper_test.go')
| -rw-r--r-- | todolist/grouper_test.go | 10 |
1 files changed, 6 insertions, 4 deletions
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"]), "") } |
