File tree Expand file tree Collapse file tree 1 file changed +13
-4
lines changed
Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -1347,16 +1347,18 @@ func Test_ListBranches(t *testing.T) {
13471347 args : map [string ]interface {}{
13481348 "repo" : "repo" ,
13491349 },
1350- wantErr : true ,
1351- errContains : "missing required parameter: owner" ,
1350+ mockResponses : []mock.MockBackendOption {},
1351+ wantErr : false ,
1352+ errContains : "missing required parameter: owner" ,
13521353 },
13531354 {
13541355 name : "missing repo" ,
13551356 args : map [string ]interface {}{
13561357 "owner" : "owner" ,
13571358 },
1358- wantErr : true ,
1359- errContains : "missing required parameter: repo" ,
1359+ mockResponses : []mock.MockBackendOption {},
1360+ wantErr : false ,
1361+ errContains : "missing required parameter: repo" ,
13601362 },
13611363 }
13621364
@@ -1381,6 +1383,13 @@ func Test_ListBranches(t *testing.T) {
13811383
13821384 require .NoError (t , err )
13831385 require .NotNil (t , result )
1386+
1387+ if tt .errContains != "" {
1388+ textContent := getTextResult (t , result )
1389+ assert .Contains (t , textContent .Text , tt .errContains )
1390+ return
1391+ }
1392+
13841393 textContent := getTextResult (t , result )
13851394 require .NotEmpty (t , textContent .Text )
13861395
You can’t perform that action at this time.
0 commit comments