@@ -985,12 +985,12 @@ func Test_AddProjectItem(t *testing.T) {
985985 body , err := io .ReadAll (r .Body )
986986 assert .NoError (t , err )
987987 var payload struct {
988- ContentType string `json:"content_type "`
989- ContentID int `json:"content_id "`
988+ Type string `json:"type "`
989+ ID int `json:"id "`
990990 }
991991 assert .NoError (t , json .Unmarshal (body , & payload ))
992- assert .Equal (t , "Issue" , payload .ContentType )
993- assert .Equal (t , 9876 , payload .ContentID )
992+ assert .Equal (t , "Issue" , payload .Type )
993+ assert .Equal (t , 9876 , payload .ID )
994994 w .WriteHeader (http .StatusCreated )
995995 _ , _ = w .Write (mock .MustMarshal (orgItem ))
996996 }),
@@ -1016,12 +1016,12 @@ func Test_AddProjectItem(t *testing.T) {
10161016 body , err := io .ReadAll (r .Body )
10171017 assert .NoError (t , err )
10181018 var payload struct {
1019- ContentType string `json:"content_type "`
1020- ContentID int `json:"content_id "`
1019+ Type string `json:"type "`
1020+ ID int `json:"id "`
10211021 }
10221022 assert .NoError (t , json .Unmarshal (body , & payload ))
1023- assert .Equal (t , "PullRequest" , payload .ContentType )
1024- assert .Equal (t , 7654 , payload .ContentID )
1023+ assert .Equal (t , "PullRequest" , payload .Type )
1024+ assert .Equal (t , 7654 , payload .ID )
10251025 w .WriteHeader (http .StatusOK )
10261026 _ , _ = w .Write (mock .MustMarshal (userItem ))
10271027 }),
0 commit comments