1 parent
31634543f0
commit
a238ff5e23
2 files changed
+22
-16
No files matched your search
+13
-15
@@ -377,21 +377,19 @@ async fn base_path_serves_the_same_embedded_ui() {
|
||||
test_idle_manager(),
|
||||
);
|
||||
|
||||
let response = app
|
||||
.oneshot(
|
||||
Request::builder()
|
||||
.uri("/mail/")
|
||||
.body(Body::empty())
|
||||
.unwrap(),
|
||||
)
|
||||
.await
|
||||
.unwrap();
|
||||
assert_eq!(response.status(), StatusCode::OK);
|
||||
let body = response.into_body().collect().await.unwrap().to_bytes();
|
||||
let html = String::from_utf8(body.to_vec()).unwrap();
|
||||
assert!(html.contains("data-base-path=\"/mail\""));
|
||||
assert!(html.contains("/mail/assets/app."));
|
||||
assert!(html.contains(".js"));
|
||||
for uri in ["/mail", "/mail/"] {
|
||||
let response = app
|
||||
.clone()
|
||||
.oneshot(Request::builder().uri(uri).body(Body::empty()).unwrap())
|
||||
.await
|
||||
.unwrap();
|
||||
assert_eq!(response.status(), StatusCode::OK, "{uri}");
|
||||
let body = response.into_body().collect().await.unwrap().to_bytes();
|
||||
let html = String::from_utf8(body.to_vec()).unwrap();
|
||||
assert!(html.contains("data-base-path=\"/mail\""), "{uri}");
|
||||
assert!(html.contains("/mail/assets/app."), "{uri}");
|
||||
assert!(html.contains(".js"), "{uri}");
|
||||
}
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
|
||||
Reference in new issue
Block a user