test: update inactive test
This commit is contained in:
parent
f2398b650c
commit
08561d48a2
2 changed files with 8 additions and 8 deletions
|
|
@ -1,12 +1,12 @@
|
|||
use axum::routing::post;
|
||||
use axum::Router;
|
||||
use serde::Deserialize;
|
||||
// use serde::Deserialize;
|
||||
|
||||
#[derive(Deserialize)]
|
||||
struct FormData {
|
||||
email: String,
|
||||
name: String,
|
||||
}
|
||||
// #[derive(Deserialize)]
|
||||
// struct FormData {
|
||||
// email: String,
|
||||
// name: String,
|
||||
// }
|
||||
pub fn routes_subscriptions() -> Router {
|
||||
Router::new().route("/subscriptions", post(|| async {}))
|
||||
}
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ async fn subscribe_returns_a_200_for_valid_form_data() {
|
|||
// #[tokio::test]
|
||||
// async fn subscribe_returns_a_400_when_data_is_missing() {
|
||||
// // Arrange
|
||||
// let TestApp { addr, .. } = spawn_app().await;
|
||||
// let TestApp { address, .. } = spawn_app().await;
|
||||
// let client = reqwest::Client::new();
|
||||
// let test_cases = vec![
|
||||
// ("name=le%20guin", "missing the email"),
|
||||
|
|
@ -66,7 +66,7 @@ async fn subscribe_returns_a_200_for_valid_form_data() {
|
|||
// for (invalid_body, error_message) in test_cases {
|
||||
// // Act
|
||||
// let response = client
|
||||
// .post(&format!("http://{addr}/subscriptions"))
|
||||
// .post(&format!("{address}/subscriptions"))
|
||||
// .header("Content-Type", "application/x-www-form-urlencoded")
|
||||
// .body(invalid_body)
|
||||
// .send()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue