Skip to content

Commit

Permalink
Fix: test
Browse files Browse the repository at this point in the history
  • Loading branch information
aopoltorzhicky committed Mar 12, 2024
1 parent 2498465 commit a3493b3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cmd/api/handler/rollup.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ func (handler *RollupHandler) List(c echo.Context) error {
Limit: req.Limit,
Offset: req.Offset,
SortOrder: pgSort(req.Sort),
SortField: req.Sort,
SortField: req.SortField,
}
rollups, err := handler.rollups.ListExt(c.Request().Context(), fltrs)
if err != nil {
Expand Down
11 changes: 8 additions & 3 deletions cmd/api/handler/rollup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,14 @@ func (s *RollupTestSuite) TestList() {
c.SetPath("/rollup")

s.rollups.EXPECT().
List(gomock.Any(), uint64(10), uint64(0), pgSort("asc")).
Return([]*storage.Rollup{
&testRollup,
ListExt(gomock.Any(), storage.RollupListFilter{
Limit: 10,
Offset: 0,
SortField: "",
SortOrder: sdk.SortOrderDesc,
}).
Return([]storage.Rollup{
testRollup,
}, nil).
Times(1)

Expand Down

0 comments on commit a3493b3

Please sign in to comment.