aboutsummaryrefslogtreecommitdiffstats
path: root/todolist/parser_test.go
diff options
context:
space:
mode:
authorQuey-Liang Kao <s101062801@m101.nthu.edu.tw>2017-08-14 16:12:53 +0800
committerQuey-Liang Kao <s101062801@m101.nthu.edu.tw>2017-08-14 16:12:53 +0800
commitc4d6dbdb100bb66db9b184c653617c47a63e91ca (patch)
tree73555a8af7496a5af47b9257037fd327fe7a279f /todolist/parser_test.go
parent26ec23620d50be79ea664a9095b3653be79e3874 (diff)
Implement the "dn" feature: Deleteing notes
Diffstat (limited to 'todolist/parser_test.go')
-rw-r--r--todolist/parser_test.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/todolist/parser_test.go b/todolist/parser_test.go
index 9412bdf..e5c7007 100644
--- a/todolist/parser_test.go
+++ b/todolist/parser_test.go
@@ -84,6 +84,13 @@ func TestParseNotes(t *testing.T) {
if todo.Notes[0] != "www.google.com" {
t.Error("Expected note 1 to be 'www.google.com' but got", todo.Notes[0])
}
+
+ if parser.ParseNotes(todo, "dn 1 0") != "delete" {
+ t.Error("Expected Notes to be deleted")
+ }
+ if len(todo.Notes) != 0 {
+ t.Error("Expected no note")
+ }
}
func TestDueToday(t *testing.T) {