mirror of
https://github.com/sebastiandine/Card-Collection-Manager-3.git
synced 2026-08-29 00:01:07 +00:00
patch: Patch/ygo 25th set 2 (#14)
This commit is contained in:
@@ -703,6 +703,17 @@ TEST_SUITE("CardPreviewService caching") {
|
||||
CHECK(http.calls == 1);
|
||||
}
|
||||
|
||||
TEST_CASE("fetchImageBytesByUrl propagates HTTP errors when uncached") {
|
||||
FixedHttpClient http;
|
||||
http.ok = false;
|
||||
http.err = "url fetch failed";
|
||||
CardPreviewService svc{http};
|
||||
|
||||
const auto out = svc.fetchImageBytesByUrl("https://cdn.example/back.png");
|
||||
REQUIRE(out.isErr());
|
||||
CHECK(out.error() == "url fetch failed");
|
||||
}
|
||||
|
||||
TEST_CASE("fetchImageBytesByUrl serves from persistent cache hit without HTTP") {
|
||||
FixedHttpClient http;
|
||||
http.body = "warm-card-back";
|
||||
|
||||
Reference in New Issue
Block a user