From 36154f4747ddfd355fdb3c8b23578b7b09d1b2e7 Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Fri, 19 Jul 2024 16:58:32 +0000 Subject: [PATCH] tests/opds: fix no longer valid feedbooks.com URLs (#12185) --- spec/unit/opds_spec.lua | 65 ++++++++++++++++++++--------------------- 1 file changed, 32 insertions(+), 33 deletions(-) diff --git a/spec/unit/opds_spec.lua b/spec/unit/opds_spec.lua index 518cd7323..f2895ec1a 100644 --- a/spec/unit/opds_spec.lua +++ b/spec/unit/opds_spec.lua @@ -188,51 +188,50 @@ One Thousand Mythological Characters Briefly Described local popular_new_sample = [[ - - http://www.feedbooks.com/publicdomain/catalog.atom + + https://catalog.feedbooks.com/catalog/public_domain.atom Public Domain Books 2014-11-30T17:54:01Z - http://assets3.feedbooks.net/images/favicon.ico?t=1417192326 + https://catalog.feedbooks.com/favicon.ico Feedbooks http://www.feedbooks.com - support@feedbooks.zendesk.com + help@demarque.com - - - - - - - - + + + + + + + - Most Popular - - 2014-11-30T17:54:01Z - http://www.feedbooks.com/books/top.atom + Most popular + + 2024-07-19T16:19:38Z + https://catalog.feedbooks.com/publicdomain/browse/top.atom?lang=en Based on last week's downloads - Recently Added - - 2014-11-30T17:54:01Z - http://www.feedbooks.com/books/recent.atom + Recently added + + 2024-07-19T16:19:38Z + https://catalog.feedbooks.com/publicdomain/browse/recent.atom?lang=en Find the latest books available Fiction - - 2014-11-30T17:54:01Z - http://www.feedbooks.com/books/categories.atom - Browse book by category + + 2024-07-19T16:19:38Z + https://catalog.feedbooks.com/publicdomain/category/FBFIC000000/sub.atom + Browse books by category - Non-Fiction - - 2014-11-30T17:54:01Z - http://www.feedbooks.com/books/categories.atom - Browse book by category + Nonfiction + + 2024-07-19T16:19:38Z + https://catalog.feedbooks.com/publicdomain/category/FBNFC000000/sub.atom + Browse books by category ]] @@ -342,10 +341,10 @@ describe("OPDS module #nocov", function() local item_table = OPDSBrowser:genItemTableFromCatalog(catalog, "http://www.feedbooks.com/publicdomain/catalog.atom") assert.truthy(item_table) - assert.are.same(item_table[2].title, "Most Popular") - assert.are.same(item_table[2].url, "http://www.feedbooks.com/books/top.atom") - assert.are.same(item_table[3].title, "Recently Added") - assert.are.same(item_table[3].url, "http://www.feedbooks.com/books/recent.atom") + assert.are.same(item_table[2].title, "Most popular") + assert.are.same(item_table[2].url, "https://catalog.feedbooks.com/publicdomain/browse/top.atom?lang=en") + assert.are.same(item_table[3].title, "Recently added") + assert.are.same(item_table[3].url, "https://catalog.feedbooks.com/publicdomain/browse/recent.atom?lang=en") end) it("should use the main URL for faceted links as long as faceted links aren't properly supported #internet", function() local catalog = OPDSParser:parse(facet_sample)