/catalog/v2/entry/<entry_id> OPDS API endpoint

This commit is contained in:
Veloman Yunkan
2021-09-01 21:59:48 +04:00
parent 12d9b69806
commit e15a0f4338
6 changed files with 40 additions and 4 deletions

View File

@ -1239,4 +1239,17 @@ TEST_F(LibraryServerTest, suggestions_in_range)
int currCount = std::count(body.begin(), body.end(), '{') - 1;
ASSERT_EQ(currCount, 0);
}
}
}
TEST_F(LibraryServerTest, catalog_v2_individual_entry_access)
{
const auto r = zfs1_->GET("/catalog/v2/entry/raycharles");
EXPECT_EQ(r->status, 200);
EXPECT_EQ(maskVariableOPDSFeedData(r->body),
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
RAY_CHARLES_CATALOG_ENTRY
);
const auto r1 = zfs1_->GET("/catalog/v2/entry/non-existent-entry");
EXPECT_EQ(r1->status, 404);
}