@@ -1369,15 +1369,18 @@ func Test_ListBranches(t *testing.T) {
13691369 // Call handler
13701370 result , err := handler (context .Background (), request )
13711371 if tt .wantErr {
1372- require .Error (t , err )
1372+ require .NoError (t , err )
1373+ textContent := getTextResult (t , result )
13731374 if tt .errContains != "" {
1374- assert .Contains (t , err . Error () , tt .errContains )
1375+ assert .Contains (t , textContent . Text , tt .errContains )
13751376 }
13761377 return
13771378 }
13781379
13791380 require .NoError (t , err )
1381+ require .NotNil (t , result )
13801382 textContent := getTextResult (t , result )
1383+ require .NotEmpty (t , textContent .Text )
13811384
13821385 // Verify response
13831386 var branches []github.Branch
@@ -1391,8 +1394,10 @@ func Test_ListBranches(t *testing.T) {
13911394
13921395 // Verify tool definition
13931396 assert .Equal (t , "list_branches" , tool .Name )
1394- assert .Contains (t , tool .InputSchema .Required , "owner" )
1395- assert .Contains (t , tool .InputSchema .Required , "repo" )
1396- assert .NotContains (t , tool .InputSchema .Required , "page" )
1397- assert .NotContains (t , tool .InputSchema .Required , "perPage" )
1397+ assert .NotEmpty (t , tool .Description )
1398+ assert .Contains (t , tool .InputSchema .Properties , "owner" )
1399+ assert .Contains (t , tool .InputSchema .Properties , "repo" )
1400+ assert .Contains (t , tool .InputSchema .Properties , "page" )
1401+ assert .Contains (t , tool .InputSchema .Properties , "perPage" )
1402+ assert .ElementsMatch (t , tool .InputSchema .Required , []string {"owner" , "repo" })
13981403}
0 commit comments