@@ -484,7 +484,7 @@ func Test_GetDiscussion(t *testing.T) {
484484 assert .ElementsMatch (t , toolDef .InputSchema .Required , []string {"owner" , "repo" , "discussionNumber" })
485485
486486 // Use exact string query that matches implementation output
487- qGetDiscussion := "query($discussionNumber:Int!$owner:String!$repo:String!){repository(owner: $owner, name: $repo){discussion(number: $discussionNumber){number,body,createdAt,url,category{name}}}}"
487+ qGetDiscussion := "query($discussionNumber:Int!$owner:String!$repo:String!){repository(owner: $owner, name: $repo){discussion(number: $discussionNumber){number,title ,body,createdAt,url,category{name}}}}"
488488
489489 vars := map [string ]interface {}{
490490 "owner" : "owner" ,
@@ -503,6 +503,7 @@ func Test_GetDiscussion(t *testing.T) {
503503 response : githubv4mock .DataResponse (map [string ]any {
504504 "repository" : map [string ]any {"discussion" : map [string ]any {
505505 "number" : 1 ,
506+ "title" : "Test Discussion Title" ,
506507 "body" : "This is a test discussion" ,
507508 "url" : "https://github.com/owner/repo/discussions/1" ,
508509 "createdAt" : "2025-04-25T12:00:00Z" ,
@@ -513,6 +514,7 @@ func Test_GetDiscussion(t *testing.T) {
513514 expected : & github.Discussion {
514515 HTMLURL : github .Ptr ("https://github.com/owner/repo/discussions/1" ),
515516 Number : github .Ptr (1 ),
517+ Title : github .Ptr ("Test Discussion Title" ),
516518 Body : github .Ptr ("This is a test discussion" ),
517519 CreatedAt : & github.Timestamp {Time : time .Date (2025 , 4 , 25 , 12 , 0 , 0 , 0 , time .UTC )},
518520 DiscussionCategory : & github.DiscussionCategory {
@@ -549,6 +551,7 @@ func Test_GetDiscussion(t *testing.T) {
549551 require .NoError (t , json .Unmarshal ([]byte (text ), & out ))
550552 assert .Equal (t , * tc .expected .HTMLURL , * out .HTMLURL )
551553 assert .Equal (t , * tc .expected .Number , * out .Number )
554+ assert .Equal (t , * tc .expected .Title , * out .Title )
552555 assert .Equal (t , * tc .expected .Body , * out .Body )
553556 // Check category label
554557 assert .Equal (t , * tc .expected .DiscussionCategory .Name , * out .DiscussionCategory .Name )
0 commit comments