Skip to content

Commit

Permalink
fix: Fix tests after rebase.
Browse files Browse the repository at this point in the history
  • Loading branch information
gfyrag committed Jul 5, 2022
1 parent 1d4a637 commit d6c66c7
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pkg/api/controllers/account_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ func TestGetAccountsWithPageSize(t *testing.T) {

cursor := internal.DecodeCursorResponse[core.Account](t, httpResponse.Body)
assert.Len(t, cursor.Data, controllers.MaxPageSize-100)
assert.Equal(t, controllers.MaxPageSize-100, cursor.PageSize)
assert.Equal(t, controllers.MaxPageSize, cursor.PageSize)
assert.Empty(t, cursor.Next)
assert.False(t, cursor.HasMore)
})
Expand Down
2 changes: 1 addition & 1 deletion pkg/api/controllers/transaction_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,7 @@ func TestGetTransactionsWithPageSize(t *testing.T) {

cursor := internal.DecodeCursorResponse[core.Transaction](t, httpResponse.Body)
assert.Len(t, cursor.Data, controllers.MaxPageSize-100)
assert.Equal(t, cursor.PageSize, controllers.MaxPageSize-100)
assert.Equal(t, cursor.PageSize, controllers.MaxPageSize)
assert.Empty(t, cursor.Next)
assert.False(t, cursor.HasMore)
})
Expand Down
2 changes: 1 addition & 1 deletion pkg/storage/sqlstorage/accounts.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ func (s *Store) getAccounts(ctx context.Context, exec executor, q storage.Accoun
}

return sharedapi.Cursor[core.Account]{
PageSize: int(q.Limit),
PageSize: int(q.PageSize),
HasMore: next != "",
Previous: previous,
Next: next,
Expand Down
2 changes: 1 addition & 1 deletion pkg/storage/sqlstorage/transactions.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ func (s *Store) getTransactions(ctx context.Context, exec executor, q storage.Tr
}

return sharedapi.Cursor[core.Transaction]{
PageSize: int(q.Limit),
PageSize: int(q.PageSize),
HasMore: next != "",
Previous: previous,
Next: next,
Expand Down

0 comments on commit d6c66c7

Please sign in to comment.