summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/authorization/cedar_authorizer_test.rs17
1 files changed, 17 insertions, 0 deletions
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);
+ }
}