Skip to content

Commit

Permalink
test: new method for tests http client
Browse files Browse the repository at this point in the history
  • Loading branch information
mario-nt committed Nov 6, 2024
1 parent 5c38420 commit 970cf3d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/common/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 970cf3d

Please sign in to comment.