diff --git a/test/library_server.cpp b/test/library_server.cpp index 5cba0eeb3..405df90ac 100644 --- a/test/library_server.cpp +++ b/test/library_server.cpp @@ -358,6 +358,26 @@ TEST_F(LibraryServerTest, catalog_search_by_language) TEST_F(LibraryServerTest, catalog_search_results_pagination) { { + // count=-1 disables the limit on the number of results + const auto r = zfs1_->GET("/ROOT%23%3F/catalog/search?count=-1"); + EXPECT_EQ(r->status, 200); + EXPECT_EQ(maskVariableOPDSFeedData(r->body), + OPDS_FEED_TAG + " 12345678-90ab-cdef-1234-567890abcdef\n" + " Filtered zims (count=-1)\n" + " YYYY-MM-DDThh:mm:ssZ\n" + " 3\n" + " 0\n" + " 3\n" + CATALOG_LINK_TAGS + CHARLES_RAY_CATALOG_ENTRY + RAY_CHARLES_CATALOG_ENTRY + UNCATEGORIZED_RAY_CHARLES_CATALOG_ENTRY + "\n" + ); + } + { + // count=0 disables the limit on the number of results const auto r = zfs1_->GET("/ROOT%23%3F/catalog/search?count=0"); EXPECT_EQ(r->status, 200); EXPECT_EQ(maskVariableOPDSFeedData(r->body),