aboutsummaryrefslogtreecommitdiffstats
path: root/todolist/parser_test.go
diff options
context:
space:
mode:
authorQuey-Liang Kao <s101062801@m101.nthu.edu.tw>2017-08-14 16:34:33 +0800
committerQuey-Liang Kao <s101062801@m101.nthu.edu.tw>2017-08-14 16:34:33 +0800
commit7c24f39a0fc8bb07dc9db4f5fecd3468705b1e37 (patch)
treefef48b2359c4a432cf8bf28c5caa16188dbb53e8 /todolist/parser_test.go
parentc4d6dbdb100bb66db9b184c653617c47a63e91ca (diff)
Implement the "en" feature: Editting 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 e5c7007..2c4fd25 100644
--- a/todolist/parser_test.go
+++ b/todolist/parser_test.go
@@ -85,6 +85,13 @@ func TestParseNotes(t *testing.T) {
t.Error("Expected note 1 to be 'www.google.com' but got", todo.Notes[0])
}
+ if parser.ParseNotes(todo, "en 1 0 www.duckduckgo.com") != "edit" {
+ t.Error("Expected Notes to be editted")
+ }
+ if todo.Notes[0] != "www.duckduckgo.com" {
+ t.Error("Expected note 1 to be 'www.duckduckgo.com' but got", todo.Notes[0])
+ }
+
if parser.ParseNotes(todo, "dn 1 0") != "delete" {
t.Error("Expected Notes to be deleted")
}