Handler to send emails to confirmed subscribers
This commit is contained in:
@@ -94,6 +94,15 @@ impl TestApp {
|
||||
.await
|
||||
.expect("Failed to execute request")
|
||||
}
|
||||
|
||||
pub async fn post_newsletters(&self, body: serde_json::Value) -> reqwest::Response {
|
||||
reqwest::Client::new()
|
||||
.post(format!("{}/newsletters", self.address))
|
||||
.json(&body)
|
||||
.send()
|
||||
.await
|
||||
.expect("Failed to execute request")
|
||||
}
|
||||
}
|
||||
|
||||
async fn configure_database(config: &DatabaseSettings) -> PgPool {
|
||||
|
||||
Reference in New Issue
Block a user