From 970cf3d9f017b0e82c87ce457346c76a447a3875 Mon Sep 17 00:00:00 2001 From: Mario Date: Wed, 6 Nov 2024 16:17:46 +0100 Subject: [PATCH] test: new method for tests http client --- tests/common/client.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/common/client.rs b/tests/common/client.rs index c9c22d2e..1351493a 100644 --- a/tests/common/client.rs +++ b/tests/common/client.rs @@ -177,6 +177,12 @@ impl Client { pub async fn ban_user(&self, username: Username) -> TextResponse { self.http_client.delete(&format!("/user/ban/{}", &username.value)).await } + + // Context: proxy + + pub async fn get_image_by_url(&self, url: &str) -> TextResponse { + self.http_client.get(&format!("/proxy/image/{url}"), Query::empty()).await + } } /// Generic HTTP Client