Test suite refactoring to match new htmx HTML swapping in pages
This commit is contained in:
@@ -21,14 +21,12 @@ async fn logout_clears_session_state() {
|
||||
assert_is_redirect_to(&response, "/admin/dashboard");
|
||||
|
||||
let html_page = app.get_admin_dashboard_html().await;
|
||||
assert!(html_page.contains(&format!("Welcome {}", app.test_user.username)));
|
||||
assert!(html_page.contains("Connected as"));
|
||||
assert!(html_page.contains(&app.test_user.username));
|
||||
|
||||
let response = app.post_logout().await;
|
||||
assert_is_redirect_to(&response, "/login");
|
||||
|
||||
let html_page = app.get_login_html().await;
|
||||
assert!(html_page.contains("You have successfully logged out"));
|
||||
|
||||
let response = app.get_admin_dashboard().await;
|
||||
assert_is_redirect_to(&response, "/login");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user