@@ -260,17 +260,19 @@ func TestGetTokenAccountInfos_UserAccounts_HappyPath(t *testing.T) {
260
260
assert .Equal (t , commonpb .AccountType_RELATIONSHIP , accountInfo .AccountType )
261
261
assert .EqualValues (t , 0 , accountInfo .Index )
262
262
assert .EqualValues (t , kin .ToQuarks (999 ), accountInfo .Balance )
263
+ require .NotNil (t , accountInfo .Relationship )
264
+ assert .Equal (t , * relationship1AccountRecords .General .RelationshipTo , accountInfo .Relationship .GetDomain ().Value )
263
265
case relationship2DerivedOwner .PublicKey ().ToBase58 ():
264
266
assert .Equal (t , commonpb .AccountType_RELATIONSHIP , accountInfo .AccountType )
265
267
assert .EqualValues (t , 0 , accountInfo .Index )
266
268
assert .EqualValues (t , kin .ToQuarks (5 ), accountInfo .Balance )
269
+ require .NotNil (t , accountInfo .Relationship )
270
+ assert .Equal (t , * relationship2AccountRecords .General .RelationshipTo , accountInfo .Relationship .GetDomain ().Value )
267
271
default :
268
272
require .Fail (t , "unexpected authority" )
269
273
}
270
274
271
- if accountInfo .AccountType == commonpb .AccountType_RELATIONSHIP {
272
- require .NotNil (t , accountInfo .Relationship )
273
- } else {
275
+ if accountInfo .AccountType != commonpb .AccountType_RELATIONSHIP {
274
276
assert .Nil (t , accountInfo .Relationship )
275
277
}
276
278
0 commit comments