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::routing::post;
|
||||||
use axum::Router;
|
use axum::Router;
|
||||||
use serde::Deserialize;
|
// use serde::Deserialize;
|
||||||
|
|
||||||
#[derive(Deserialize)]
|
// #[derive(Deserialize)]
|
||||||
struct FormData {
|
// struct FormData {
|
||||||
email: String,
|
// email: String,
|
||||||
name: String,
|
// name: String,
|
||||||
}
|
// }
|
||||||
pub fn routes_subscriptions() -> Router {
|
pub fn routes_subscriptions() -> Router {
|
||||||
Router::new().route("/subscriptions", post(|| async {}))
|
Router::new().route("/subscriptions", post(|| async {}))
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@ async fn subscribe_returns_a_200_for_valid_form_data() {
|
||||||
// #[tokio::test]
|
// #[tokio::test]
|
||||||
// async fn subscribe_returns_a_400_when_data_is_missing() {
|
// async fn subscribe_returns_a_400_when_data_is_missing() {
|
||||||
// // Arrange
|
// // Arrange
|
||||||
// let TestApp { addr, .. } = spawn_app().await;
|
// let TestApp { address, .. } = spawn_app().await;
|
||||||
// let client = reqwest::Client::new();
|
// let client = reqwest::Client::new();
|
||||||
// let test_cases = vec![
|
// let test_cases = vec![
|
||||||
// ("name=le%20guin", "missing the email"),
|
// ("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 {
|
// for (invalid_body, error_message) in test_cases {
|
||||||
// // Act
|
// // Act
|
||||||
// let response = client
|
// let response = client
|
||||||
// .post(&format!("http://{addr}/subscriptions"))
|
// .post(&format!("{address}/subscriptions"))
|
||||||
// .header("Content-Type", "application/x-www-form-urlencoded")
|
// .header("Content-Type", "application/x-www-form-urlencoded")
|
||||||
// .body(invalid_body)
|
// .body(invalid_body)
|
||||||
// .send()
|
// .send()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue