From 08c3a9d8b2beb0b3ad087c38cc895e253d274158 Mon Sep 17 00:00:00 2001 From: Veloman Yunkan Date: Fri, 21 Jan 2022 19:28:16 +0400 Subject: [PATCH] Testing of /catalog/search?count=0 --- test/server.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/test/server.cpp b/test/server.cpp index 47dfe629f..9acf8e595 100644 --- a/test/server.cpp +++ b/test/server.cpp @@ -929,6 +929,21 @@ TEST_F(LibraryServerTest, catalog_search_by_category) TEST_F(LibraryServerTest, catalog_search_results_pagination) { + { + const auto r = zfs1_->GET("/ROOT/catalog/search?count=0"); + EXPECT_EQ(r->status, 200); + EXPECT_EQ(maskVariableOPDSFeedData(r->body), + OPDS_FEED_TAG + " 12345678-90ab-cdef-1234-567890abcdef\n" + " Filtered zims (count=0)\n" + " YYYY-MM-DDThh:mm:ssZ\n" + " 3\n" + " 0\n" + " 0\n" + CATALOG_LINK_TAGS + "\n" + ); + } { const auto r = zfs1_->GET("/ROOT/catalog/search?count=1"); EXPECT_EQ(r->status, 200);