@@ -484,7 +484,7 @@ func Test_GetDiscussion(t *testing.T) {
484
484
assert .ElementsMatch (t , toolDef .InputSchema .Required , []string {"owner" , "repo" , "discussionNumber" })
485
485
486
486
// 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}}}}"
488
488
489
489
vars := map [string ]interface {}{
490
490
"owner" : "owner" ,
@@ -503,6 +503,7 @@ func Test_GetDiscussion(t *testing.T) {
503
503
response : githubv4mock .DataResponse (map [string ]any {
504
504
"repository" : map [string ]any {"discussion" : map [string ]any {
505
505
"number" : 1 ,
506
+ "title" : "Test Discussion Title" ,
506
507
"body" : "This is a test discussion" ,
507
508
"url" : "https://github.com/owner/repo/discussions/1" ,
508
509
"createdAt" : "2025-04-25T12:00:00Z" ,
@@ -513,6 +514,7 @@ func Test_GetDiscussion(t *testing.T) {
513
514
expected : & github.Discussion {
514
515
HTMLURL : github .Ptr ("https://github.com/owner/repo/discussions/1" ),
515
516
Number : github .Ptr (1 ),
517
+ Title : github .Ptr ("Test Discussion Title" ),
516
518
Body : github .Ptr ("This is a test discussion" ),
517
519
CreatedAt : & github.Timestamp {Time : time .Date (2025 , 4 , 25 , 12 , 0 , 0 , 0 , time .UTC )},
518
520
DiscussionCategory : & github.DiscussionCategory {
@@ -549,6 +551,7 @@ func Test_GetDiscussion(t *testing.T) {
549
551
require .NoError (t , json .Unmarshal ([]byte (text ), & out ))
550
552
assert .Equal (t , * tc .expected .HTMLURL , * out .HTMLURL )
551
553
assert .Equal (t , * tc .expected .Number , * out .Number )
554
+ assert .Equal (t , * tc .expected .Title , * out .Title )
552
555
assert .Equal (t , * tc .expected .Body , * out .Body )
553
556
// Check category label
554
557
assert .Equal (t , * tc .expected .DiscussionCategory .Name , * out .DiscussionCategory .Name )
0 commit comments