File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -44,7 +44,10 @@ func TestCreateBranchRestrictionsKindPush(t *testing.T) {
44
44
Kind : "push" ,
45
45
Users : []string {user },
46
46
}
47
- res , _ := c .Repositories .BranchRestrictions .Create (opt )
47
+ res , err := c .Repositories .BranchRestrictions .Create (opt )
48
+ if err != nil {
49
+ t .Error (err )
50
+ }
48
51
jsonMap := res .(map [string ]interface {})
49
52
if jsonMap ["type" ] != "branchrestriction" {
50
53
t .Error ("is not branchrestriction type" )
@@ -65,7 +68,10 @@ func TestCreateBranchRestrictionsKindRequirePassingBuilds(t *testing.T) {
65
68
Kind : "require_passing_builds_to_merge" ,
66
69
Value : 2 ,
67
70
}
68
- res , _ := c .Repositories .BranchRestrictions .Create (opt )
71
+ res , err := c .Repositories .BranchRestrictions .Create (opt )
72
+ if err != nil {
73
+ t .Error (err )
74
+ }
69
75
jsonMap := res .(map [string ]interface {})
70
76
if jsonMap ["type" ] != "branchrestriction" {
71
77
t .Error ("is not branchrestriction type" )
Original file line number Diff line number Diff line change @@ -32,7 +32,10 @@ func TestDiff(t *testing.T) {
32
32
RepoSlug : repo ,
33
33
Spec : spec ,
34
34
}
35
- res , _ := c .Repositories .Diff .GetDiff (opt )
35
+ res , err := c .Repositories .Diff .GetDiff (opt )
36
+ if err != nil {
37
+ t .Error (err )
38
+ }
36
39
37
40
pp .Println (res )
38
41
You can’t perform that action at this time.
0 commit comments