diff --git a/readers/api/endpoint_test.go b/readers/api/endpoint_test.go index 60a9f403785..d493f196dea 100644 --- a/readers/api/endpoint_test.go +++ b/readers/api/endpoint_test.go @@ -147,7 +147,7 @@ func TestReadAll(t *testing.T) { token: userToken, status: http.StatusOK, res: pageRes{ - PageMetadata: readers.PageMetadata{Offset: 0, Limit: 10, Format: "messages"}, + PageMetadata: readers.PageMetadata{Limit: 10, Format: "messages"}, Total: uint64(len(messages)), Messages: messages[0:10], }, @@ -158,7 +158,7 @@ func TestReadAll(t *testing.T) { token: userToken, status: http.StatusOK, res: pageRes{ - PageMetadata: readers.PageMetadata{Offset: 0, Limit: 10}, + PageMetadata: readers.PageMetadata{Limit: 10}, Total: uint64(len(messages)), Messages: messages[0:10], }, @@ -240,7 +240,7 @@ func TestReadAll(t *testing.T) { key: thingToken, status: http.StatusOK, res: pageRes{ - PageMetadata: readers.PageMetadata{Offset: 0}, + PageMetadata: readers.PageMetadata{}, Total: uint64(len(messages)), Messages: messages[0:10], }, @@ -464,7 +464,7 @@ func TestReadAll(t *testing.T) { key: thingToken, status: http.StatusOK, res: pageRes{ - PageMetadata: readers.PageMetadata{Limit: 10, Format: "messages", Interval: ""}, + PageMetadata: readers.PageMetadata{Limit: 10, Format: "messages", Interval: "10h"}, Total: uint64(len(messages)), Messages: messages[0:10], }, @@ -522,7 +522,7 @@ func TestReadAll(t *testing.T) { token: userToken, status: http.StatusOK, res: pageRes{ - PageMetadata: readers.PageMetadata{Offset: 0, Limit: 10}, + PageMetadata: readers.PageMetadata{Limit: 10}, Total: uint64(len(messages)), Messages: messages[0:10], }, @@ -604,7 +604,7 @@ func TestReadAll(t *testing.T) { token: userToken, status: http.StatusOK, res: pageRes{ - PageMetadata: readers.PageMetadata{Offset: 0}, + PageMetadata: readers.PageMetadata{}, Total: uint64(len(messages)), Messages: messages[0:10], },