|
|
|
@ -300,19 +300,19 @@ describe("OPDS module #nocov", function()
|
|
|
|
|
end)
|
|
|
|
|
it("should use the main URL for faceted links as long as faceted links aren't properly supported", function()
|
|
|
|
|
local catalog = OPDSParser:parse(facet_sample)
|
|
|
|
|
local item_table = OPDSBrowser:genItemTableFromCatalog(catalog, "http://flibusta.net/opds")
|
|
|
|
|
local item_table = OPDSBrowser:genItemTableFromCatalog(catalog, "http://flibusta.is/opds")
|
|
|
|
|
|
|
|
|
|
assert.truthy(item_table)
|
|
|
|
|
assert.are.same(item_table[2].url, "http://flibusta.net/opds/author/75357")
|
|
|
|
|
assert.are.same(item_table[2].url, "http://flibusta.is/opds/author/75357")
|
|
|
|
|
end)
|
|
|
|
|
end)
|
|
|
|
|
|
|
|
|
|
it("should not fill item table incorrectly with thumbnail or image URL", function()
|
|
|
|
|
local catalog = OPDSParser:parse(facet_sample)
|
|
|
|
|
local item_table = OPDSBrowser:genItemTableFromCatalog(catalog, "http://flibusta.net/opds")
|
|
|
|
|
local item_table = OPDSBrowser:genItemTableFromCatalog(catalog, "http://flibusta.is/opds")
|
|
|
|
|
|
|
|
|
|
assert.truthy(item_table)
|
|
|
|
|
assert.are_not.same(item_table[2].image, "http://flibusta.net/opds/author/75357")
|
|
|
|
|
assert.are_not.same(item_table[2].image, "http://flibusta.is/opds/author/75357")
|
|
|
|
|
end)
|
|
|
|
|
end)
|
|
|
|
|
end)
|
|
|
|
|