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) {
4444 Kind : "push" ,
4545 Users : []string {user },
4646 }
47- res , _ := c .Repositories .BranchRestrictions .Create (opt )
47+ res , err := c .Repositories .BranchRestrictions .Create (opt )
48+ if err != nil {
49+ t .Error (err )
50+ }
4851 jsonMap := res .(map [string ]interface {})
4952 if jsonMap ["type" ] != "branchrestriction" {
5053 t .Error ("is not branchrestriction type" )
@@ -65,7 +68,10 @@ func TestCreateBranchRestrictionsKindRequirePassingBuilds(t *testing.T) {
6568 Kind : "require_passing_builds_to_merge" ,
6669 Value : 2 ,
6770 }
68- res , _ := c .Repositories .BranchRestrictions .Create (opt )
71+ res , err := c .Repositories .BranchRestrictions .Create (opt )
72+ if err != nil {
73+ t .Error (err )
74+ }
6975 jsonMap := res .(map [string ]interface {})
7076 if jsonMap ["type" ] != "branchrestriction" {
7177 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) {
3232 RepoSlug : repo ,
3333 Spec : spec ,
3434 }
35- res , _ := c .Repositories .Diff .GetDiff (opt )
35+ res , err := c .Repositories .Diff .GetDiff (opt )
36+ if err != nil {
37+ t .Error (err )
38+ }
3639
3740 pp .Println (res )
3841
You can’t perform that action at this time.
0 commit comments