Edit profile and templates update
All checks were successful
Rust / Test (push) Successful in 6m6s
Rust / Rustfmt (push) Successful in 22s
Rust / Clippy (push) Successful in 1m36s
Rust / Code coverage (push) Successful in 4m47s

This commit is contained in:
Alphonse Paix
2025-10-06 19:13:51 +02:00
parent da590fb7c6
commit b252216709
27 changed files with 596 additions and 262 deletions

View File

@@ -21,7 +21,7 @@ async fn logout_clears_session_state(connection_pool: PgPool) {
"password": &app.test_user.password,
});
let response = app.post_login(&login_body).await;
assert_is_redirect_to(&response, "/admin/dashboard");
assert_is_redirect_to(&response, "/dashboard");
let html_page = app.get_admin_dashboard_html().await;
assert!(html_page.contains("Connected as"));

View File

@@ -85,5 +85,5 @@ async fn changing_password_works(connection_pool: PgPool) {
"password": new_password,
});
let response = app.post_login(login_body).await;
assert_is_redirect_to(&response, "/admin/dashboard");
assert_is_redirect_to(&response, "/dashboard");
}

View File

@@ -279,7 +279,7 @@ impl TestApp {
pub async fn get_admin_dashboard(&self) -> reqwest::Response {
self.api_client
.get(format!("{}/admin/dashboard", &self.address))
.get(format!("{}/dashboard", &self.address))
.send()
.await
.expect("Failed to execute request")
@@ -328,7 +328,7 @@ impl TestApp {
Body: serde::Serialize,
{
self.api_client
.post(format!("{}/admin/newsletters", self.address))
.post(format!("{}/newsletters", self.address))
.form(body)
.send()
.await
@@ -357,7 +357,7 @@ impl TestApp {
pub async fn logout(&self) -> reqwest::Response {
self.api_client
.get(format!("{}/admin/logout", self.address))
.get(format!("{}/logout", self.address))
.send()
.await
.expect("Failed to execute request")
@@ -368,7 +368,7 @@ impl TestApp {
Body: serde::Serialize,
{
self.api_client
.post(format!("{}/admin/password", self.address))
.post(format!("{}/password", self.address))
.form(body)
.send()
.await
@@ -380,7 +380,7 @@ impl TestApp {
Body: serde::Serialize,
{
self.api_client
.post(format!("{}/admin/posts", self.address))
.post(format!("{}/posts", self.address))
.form(body)
.send()
.await

View File

@@ -28,7 +28,7 @@ async fn login_redirects_to_admin_dashboard_after_login_success(connection_pool:
});
let response = app.post_login(&login_body).await;
assert_is_redirect_to(&response, "/admin/dashboard");
assert_is_redirect_to(&response, "/dashboard");
let html_page = app.get_admin_dashboard_html().await;
assert!(html_page.contains("Connected as"));