Edit profile and templates update
This commit is contained in:
@@ -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"));
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"));
|
||||
|
||||
Reference in New Issue
Block a user