Skip to content

Commit 65d090a

Browse files
committed
test(oidc) :: keep static assets available without login
1 parent 8f749b1 commit 65d090a

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

‎tests/oidc/mod.rs‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -720,6 +720,14 @@ async fn test_oidc_with_site_prefix() {
720720
redirect_uri.contains("/my-app/sqlpage/oidc_callback"),
721721
"Redirect URI should contain site prefix. Got: {redirect_uri}"
722722
);
723+
724+
let asset_path = include_str!(concat!(
725+
env!("CARGO_MANIFEST_DIR"),
726+
"/frontend/dist/sqlpage.js.filename.txt"
727+
));
728+
let asset_uri = format!("/my-app/{asset_path}");
729+
let asset = request_with_cookies!(app, test::TestRequest::get().uri(&asset_uri), cookies);
730+
assert_eq!(asset.status(), StatusCode::OK);
723731
}
724732

725733
#[actix_web::test]

0 commit comments

Comments
 (0)