Unsubscribe option available on website
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user