diff options
Diffstat (limited to 'tests/authorization/cedar_authorizer_test.rs')
| -rw-r--r-- | tests/authorization/cedar_authorizer_test.rs | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/tests/authorization/cedar_authorizer_test.rs b/tests/authorization/cedar_authorizer_test.rs index 50fdd7a5..47dde0c8 100644 --- a/tests/authorization/cedar_authorizer_test.rs +++ b/tests/authorization/cedar_authorizer_test.rs @@ -6,7 +6,7 @@ mod tests { use std::collections::HashMap; fn subject() -> authzd::CedarAuthorizer { - build_cedar_authorizer() + build_cedar_authorizer(cedar_policy::Entities::empty()) } #[test] @@ -105,7 +105,6 @@ mod tests { ]; let authorizer = subject(); - for host in hosts { for (method, path, expected) in &routes { let request = build_request(|item: &mut HttpRequest| { @@ -123,4 +122,14 @@ mod tests { } } } + + #[test] + fn test_allow_access_to_developer_in_sparkle_project() { + let request = build_request(|item: &mut HttpRequest| { + item.method = "GET".to_string(); + item.path = "/dashboard".to_string(); + item.host = "sparkle.staging.runway.gitlab.net".to_string(); + }); + assert!(subject().authorize(request)); + } } |
