feat: update medias
This commit is contained in:
@@ -167,20 +167,20 @@ func (s *MediasTestSuite) Test_Page() {
|
||||
|
||||
Convey("Page", func() {
|
||||
Convey("page 1", func() {
|
||||
pager, err := Medias.List(context.Background(), &requests.Pagination{Page: 1, Limit: 10})
|
||||
pager, err := Medias.List(context.Background(), &requests.Pagination{Page: 1, Limit: 10}, nil)
|
||||
So(err, ShouldBeNil)
|
||||
So(pager.Total, ShouldEqual, 20)
|
||||
So(pager.Items, ShouldHaveLength, 10)
|
||||
})
|
||||
Convey("page 2", func() {
|
||||
pager, err := Medias.List(context.Background(), &requests.Pagination{Page: 2, Limit: 10})
|
||||
pager, err := Medias.List(context.Background(), &requests.Pagination{Page: 2, Limit: 10}, nil)
|
||||
So(err, ShouldBeNil)
|
||||
So(pager.Total, ShouldEqual, 20)
|
||||
So(pager.Items, ShouldHaveLength, 10)
|
||||
})
|
||||
|
||||
Convey("page 3", func() {
|
||||
pager, err := Medias.List(context.Background(), &requests.Pagination{Page: 3, Limit: 10})
|
||||
pager, err := Medias.List(context.Background(), &requests.Pagination{Page: 3, Limit: 10}, nil)
|
||||
So(err, ShouldBeNil)
|
||||
So(pager.Total, ShouldEqual, 20)
|
||||
So(pager.Items, ShouldBeEmpty)
|
||||
|
||||
Reference in New Issue
Block a user