@@ -486,7 +486,8 @@ func Test_ProjectsWrite_AddProjectItem(t *testing.T) {
486486 struct {
487487 AddProjectV2ItemByID struct {
488488 Item struct {
489- ID githubv4.ID
489+ ID githubv4.ID
490+ FullDatabaseID string `graphql:"fullDatabaseId"`
490491 }
491492 } `graphql:"addProjectV2ItemById(input: $input)"`
492493 }{},
@@ -498,7 +499,8 @@ func Test_ProjectsWrite_AddProjectItem(t *testing.T) {
498499 githubv4mock .DataResponse (map [string ]any {
499500 "addProjectV2ItemById" : map [string ]any {
500501 "item" : map [string ]any {
501- "id" : "PVTI_item1" ,
502+ "id" : "PVTI_item1" ,
503+ "fullDatabaseId" : "1001" ,
502504 },
503505 },
504506 }),
@@ -530,6 +532,8 @@ func Test_ProjectsWrite_AddProjectItem(t *testing.T) {
530532 err = json .Unmarshal ([]byte (textContent .Text ), & response )
531533 require .NoError (t , err )
532534 assert .NotNil (t , response ["id" ])
535+ assert .Equal (t , float64 (1001 ), response ["item_id" ])
536+ assert .Equal (t , "1001" , response ["full_database_id" ])
533537 assert .Contains (t , response ["message" ], "Successfully added" )
534538 })
535539
@@ -583,7 +587,8 @@ func Test_ProjectsWrite_AddProjectItem(t *testing.T) {
583587 struct {
584588 AddProjectV2ItemByID struct {
585589 Item struct {
586- ID githubv4.ID
590+ ID githubv4.ID
591+ FullDatabaseID string `graphql:"fullDatabaseId"`
587592 }
588593 } `graphql:"addProjectV2ItemById(input: $input)"`
589594 }{},
@@ -595,7 +600,8 @@ func Test_ProjectsWrite_AddProjectItem(t *testing.T) {
595600 githubv4mock .DataResponse (map [string ]any {
596601 "addProjectV2ItemById" : map [string ]any {
597602 "item" : map [string ]any {
598- "id" : "PVTI_item2" ,
603+ "id" : "PVTI_item2" ,
604+ "fullDatabaseId" : "1002" ,
599605 },
600606 },
601607 }),
@@ -627,6 +633,8 @@ func Test_ProjectsWrite_AddProjectItem(t *testing.T) {
627633 err = json .Unmarshal ([]byte (textContent .Text ), & response )
628634 require .NoError (t , err )
629635 assert .NotNil (t , response ["id" ])
636+ assert .Equal (t , float64 (1002 ), response ["item_id" ])
637+ assert .Equal (t , "1002" , response ["full_database_id" ])
630638 assert .Contains (t , response ["message" ], "Successfully added" )
631639 })
632640
0 commit comments