From 340fadd9be9e8b00627412a9da41992cd60210fa Mon Sep 17 00:00:00 2001 From: Veloman Yunkan Date: Fri, 10 Feb 2023 19:13:33 +0100 Subject: [PATCH] Testing of /catalog/search?count=-1 --- test/library_server.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) 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),