Unsubscribe option available on website
This commit is contained in:
@@ -202,10 +202,10 @@ impl TestApp {
|
||||
ConfirmationLinks { html, text }
|
||||
}
|
||||
|
||||
pub async fn get_unsubscribe(&self, unsubscribe_token: String) -> reqwest::Response {
|
||||
pub async fn get_unsubscribe_confirm(&self, unsubscribe_token: &str) -> reqwest::Response {
|
||||
self.api_client
|
||||
.get(format!(
|
||||
"{}/unsubscribe?token={}",
|
||||
"{}/unsubscribe/confirm?token={}",
|
||||
&self.address, unsubscribe_token
|
||||
))
|
||||
.send()
|
||||
@@ -298,6 +298,18 @@ impl TestApp {
|
||||
.await
|
||||
.expect("Failed to execute request")
|
||||
}
|
||||
|
||||
pub async fn post_unsubscribe<Body>(&self, body: &Body) -> reqwest::Response
|
||||
where
|
||||
Body: serde::Serialize,
|
||||
{
|
||||
self.api_client
|
||||
.post(format!("{}/unsubscribe", self.address))
|
||||
.form(body)
|
||||
.send()
|
||||
.await
|
||||
.expect("Failed to execute request")
|
||||
}
|
||||
}
|
||||
|
||||
async fn configure_database(config: &DatabaseSettings) -> PgPool {
|
||||
|
||||
Reference in New Issue
Block a user