From 084ec040799fcb86addc5985705484c26c0b90c2 Mon Sep 17 00:00:00 2001 From: Claudio Ortolina Date: Sun, 22 Dec 2024 22:20:29 +0000 Subject: [PATCH] Add prod tests for cover URLs --- test/prod.hurl | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/test/prod.hurl b/test/prod.hurl index fb05349c..d3949645 100644 --- a/test/prod.hurl +++ b/test/prod.hurl @@ -1,4 +1,6 @@ # API requires a valid token + +# GET latest record GET https://music-library.claudio-ortolina.org/api/collection/latest Content-Type: application/json HTTP 401 @@ -11,3 +13,14 @@ HTTP 200 [Asserts] # Record data is returned - one property is enough jsonpath "$.title" != null + +[Captures] +cover-url: jsonpath "$.cover_url" + +# GET cover image +GET {{cover-url}} +HTTP 401 + +GET {{cover-url}} +Authorization: Bearer {{api_token}} +HTTP 200