@@ -562,7 +562,9 @@ func TestCopilotService_ListCopilotSeats(t *testing.T) {
562562 },
563563 }
564564
565- assertNoDiff (t , want , got )
565+ if ! cmp .Equal (want , got ) {
566+ t .Errorf ("CopilotService returned %+v, want %+v" , got , want )
567+ }
566568
567569 const methodName = "ListCopilotSeats"
568570
@@ -1194,7 +1196,9 @@ func TestCopilotService_GetOrganizationCopilotSpace(t *testing.T) {
11941196 BaseRole : "read" ,
11951197 }
11961198
1197- assertNoDiff (t , want , got )
1199+ if ! cmp .Equal (want , got ) {
1200+ t .Errorf ("CopilotService returned %+v, want %+v" , got , want )
1201+ }
11981202
11991203 const methodName = "GetOrganizationCopilotSpace"
12001204
@@ -1221,7 +1225,7 @@ func TestCopilotService_CreateOrganizationCopilotSpace(t *testing.T) {
12211225 Description : Ptr ("Organization space for team planning" ),
12221226 GeneralInstructions : Ptr ("Help the team with planning tasks" ),
12231227 BaseRole : Ptr ("no_access" ),
1224- ResourcesAttributes : []* CopilotSpaceResource {
1228+ ResourcesAttributes : []* CreateCopilotSpaceResourceAttributes {
12251229 {
12261230 ResourceType : Ptr ("free_text" ),
12271231 Metadata : & CopilotSpaceMetadata {
@@ -1273,8 +1277,8 @@ func TestCopilotService_CreateOrganizationCopilotSpace(t *testing.T) {
12731277 Height : Ptr (640 ),
12741278 Width : Ptr (480 ),
12751279 },
1276- CreatedAt : refTimestamp ( 1676450100 ) ,
1277- UpdatedAt : refTimestamp ( 1676450400 ) ,
1280+ CreatedAt : & Timestamp { referenceTime } ,
1281+ UpdatedAt : & Timestamp { referenceTime } ,
12781282 },
12791283 },
12801284 }
@@ -1320,12 +1324,12 @@ func TestCopilotService_CreateOrganizationCopilotSpace(t *testing.T) {
13201324 "metadata": {
13211325 "copilot_chat_attachment_id": 123,
13221326 "media_type": "image/png",
1323- "url": "https://test .com/image.png",
1327+ "url": "https://example .com/image.png",
13241328 "height": 640,
13251329 "width": 480
13261330 },
1327- "created_at": "2023-02-15T08:35:00Z" ,
1328- "updated_at": "2023-02-15T08:40:00Z"
1331+ "created_at": ` + referenceTimeStr + ` ,
1332+ "updated_at": ` + referenceTimeStr + `
13291333 }
13301334 ]
13311335 }` )
@@ -1337,7 +1341,9 @@ func TestCopilotService_CreateOrganizationCopilotSpace(t *testing.T) {
13371341 t .Errorf ("Copilot.CreateOrganizationCopilotSpace returned error: %v" , err )
13381342 }
13391343
1340- assertNoDiff (t , want , got )
1344+ if ! cmp .Equal (want , got ) {
1345+ t .Errorf ("CopilotService returned %+v, want %+v" , got , want )
1346+ }
13411347
13421348 const methodName = "CreateOrganizationCopilotSpace"
13431349
@@ -1364,7 +1370,7 @@ func TestCopilotService_UpdateOrganizationCopilotSpace(t *testing.T) {
13641370 Description : Ptr ("Updated organization space for team planning" ),
13651371 GeneralInstructions : Ptr ("Help the team with updated planning tasks" ),
13661372 BaseRole : Ptr ("read" ),
1367- ResourcesAttributes : []* CopilotSpaceResource {
1373+ ResourcesAttributes : []* UpdateCopilotSpaceResourceAttributes {
13681374 {
13691375 ID : Ptr (int64 (101 )),
13701376 ResourceType : Ptr ("free_text" ),
@@ -1373,6 +1379,10 @@ func TestCopilotService_UpdateOrganizationCopilotSpace(t *testing.T) {
13731379 Text : Ptr ("Our team follows agile methodology" ),
13741380 },
13751381 },
1382+ {
1383+ ID : Ptr (int64 (102 )),
1384+ Destroy : Ptr (true ),
1385+ },
13761386 },
13771387 }
13781388
@@ -1453,7 +1463,9 @@ func TestCopilotService_UpdateOrganizationCopilotSpace(t *testing.T) {
14531463 t .Errorf ("Copilot.UpdateOrganizationCopilotSpace returned error: %v" , err )
14541464 }
14551465
1456- assertNoDiff (t , want , got )
1466+ if ! cmp .Equal (want , got ) {
1467+ t .Errorf ("CopilotService returned %+v, want %+v" , got , want )
1468+ }
14571469
14581470 const methodName = "UpdateOrganizationCopilotSpace"
14591471
0 commit comments