-
-
Notifications
You must be signed in to change notification settings - Fork 131
Expand file tree
/
Copy pathmodify_test.go
More file actions
32 lines (24 loc) · 626 Bytes
/
Copy pathmodify_test.go
File metadata and controls
32 lines (24 loc) · 626 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package main
import (
"errors"
"testing"
todoist "github.com/sachaos/todoist/lib"
)
func TestModify_NoArgs(t *testing.T) {
client := todoist.NewClient(&todoist.Config{})
client.Store = testStore()
ctx := newTestContext(client, []string{})
err := Modify(ctx)
if err == nil {
t.Error("expected error for no args, got nil")
}
}
func TestModify_NotFound(t *testing.T) {
client := todoist.NewClient(&todoist.Config{})
client.Store = testStore()
ctx := newTestContext(client, []string{"nonexistent-id"})
err := Modify(ctx)
if !errors.Is(err, IdNotFound) {
t.Errorf("expected IdNotFound, got %v", err)
}
}