Unsubscribe option available on website

This commit is contained in:
Alphonse Paix
2025-09-22 15:44:02 +02:00
parent a37123a32d
commit f1ce77a762
21 changed files with 400 additions and 91 deletions

View File

@@ -16,7 +16,7 @@ async fn subscribe_displays_a_confirmation_message_for_valid_form_data() {
assert!(response.status().is_success());
let html_fragment = response.text().await.unwrap();
assert!(html_fragment.contains("A confirmation email has been sent"));
assert!(html_fragment.contains("You'll receive a confirmation email shortly"));
}
#[tokio::test]
@@ -33,8 +33,8 @@ async fn subscribe_persists_the_new_subscriber() {
let response = app.post_subscriptions(body).await;
assert!(response.status().is_success());
let html_fragment = response.text().await.unwrap();
assert!(html_fragment.contains("A confirmation email has been sent"));
let html_fragment = dbg!(response.text().await.unwrap());
assert!(html_fragment.contains("You'll receive a confirmation email shortly"));
let saved = sqlx::query!("SELECT email, status FROM subscriptions")
.fetch_one(&app.connection_pool)