@@ -32,6 +32,15 @@ func TestGitignoresService_List(t *testing.T) {
32
32
if ! reflect .DeepEqual (available , want ) {
33
33
t .Errorf ("Gitignores.List returned %+v, want %+v" , available , want )
34
34
}
35
+
36
+ const methodName = "List"
37
+ testNewRequestAndDoFailure (t , methodName , client , func () (* Response , error ) {
38
+ got , resp , err := client .Gitignores .List (ctx )
39
+ if got != nil {
40
+ t .Errorf ("testNewRequestAndDoFailure %v = %#v, want nil" , methodName , got )
41
+ }
42
+ return resp , err
43
+ })
35
44
}
36
45
37
46
func TestGitignoresService_Get (t * testing.T ) {
@@ -53,6 +62,20 @@ func TestGitignoresService_Get(t *testing.T) {
53
62
if ! reflect .DeepEqual (gitignore , want ) {
54
63
t .Errorf ("Gitignores.Get returned %+v, want %+v" , gitignore , want )
55
64
}
65
+
66
+ const methodName = "Get"
67
+ testBadOptions (t , methodName , func () (err error ) {
68
+ _ , _ , err = client .Gitignores .Get (ctx , "\n " )
69
+ return err
70
+ })
71
+
72
+ testNewRequestAndDoFailure (t , methodName , client , func () (* Response , error ) {
73
+ got , resp , err := client .Gitignores .Get (ctx , "name" )
74
+ if got != nil {
75
+ t .Errorf ("testNewRequestAndDoFailure %v = %#v, want nil" , methodName , got )
76
+ }
77
+ return resp , err
78
+ })
56
79
}
57
80
58
81
func TestGitignoresService_Get_invalidTemplate (t * testing.T ) {
0 commit comments