Skip to content

Commit

Permalink
Fixed account statuses test
Browse files Browse the repository at this point in the history
  • Loading branch information
AndriiDiachuk committed Dec 11, 2024
1 parent 88e0333 commit 8432297
Showing 1 changed file with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -188,10 +188,19 @@ func (s *AccountStatusesProviderSuite) requireAccountStatuses(
v interface{},
expectedAccountStatusesResponse *backend.AccountStatusesResponse,
) {
_, ok := v.(*models.AccountStatusesResponse)
actualResponse, ok := v.(*models.AccountStatusesResponse)
require.True(s.T(), ok, "Expected *models.AccountStatusesResponse, got %T", v)

//s.Require().ElementsMatch(expectedAccountStatusesResponse.AccountEvents, actualResponse.AccountEvents)
require.Equal(s.T(), expectedAccountStatusesResponse.BlockID.String(), actualResponse.BlockID)
require.Equal(s.T(), len(expectedAccountStatusesResponse.AccountEvents), len(actualResponse.AccountEvents))

for key, expectedEvents := range expectedAccountStatusesResponse.AccountEvents {
actualEvents, ok := actualResponse.AccountEvents[key]
require.True(s.T(), ok, "Missing key in actual AccountEvents: %s", key)

s.Require().Equal(expectedEvents, actualEvents, "Mismatch for key: %s", key)
}

}

// TestAccountStatusesDataProvider_InvalidArguments tests the behavior of the account statuses data provider
Expand Down

0 comments on commit 8432297

Please sign in to comment.