From cbb77bed42e4acbf66ba882db262977615637261 Mon Sep 17 00:00:00 2001 From: mo khan Date: Fri, 11 Jul 2025 16:03:43 -0600 Subject: test: add test to ensure access to the sparkle homepage in dev --- tests/authorization/cedar_authorizer_test.rs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/tests/authorization/cedar_authorizer_test.rs b/tests/authorization/cedar_authorizer_test.rs index f056c8c7..7a99a7d9 100644 --- a/tests/authorization/cedar_authorizer_test.rs +++ b/tests/authorization/cedar_authorizer_test.rs @@ -111,4 +111,21 @@ mod tests { let authorizer = subject_with(entities); assert!(!authorizer.authorize(request.clone())); } + + #[test] + fn test_sparkle_homepage() { + let request = build_request(|item: &mut HttpRequest| { + item.method = "GET".to_string(); + item.path = "/".to_string(); + item.host = "localhost:10000".to_string(); + item.headers = build_headers(vec![ + (String::from(":path"), item.path.to_string()), + (String::from(":method"), item.method.to_string()), + (String::from(":authority"), item.host.to_string()), + ]); + }); + + let authorizer = subject(); + assert_eq!(authorizer.authorize(request), true); + } } -- cgit v1.2.3