| 26 | using ::google::rpc::context::AttributeContext; |
| 27 | |
| 28 | TEST(EvaluateWithExtensionFunction, Baseline) { |
| 29 | AttributeContext context; |
| 30 | ASSERT_TRUE(google::protobuf::TextFormat::ParseFromString( |
| 31 | R"(request { |
| 32 | path: "/" |
| 33 | auth { |
| 34 | claims { |
| 35 | fields { |
| 36 | key: "group" |
| 37 | value {string_value: "admin"} |
| 38 | } |
| 39 | } |
| 40 | } |
| 41 | })", |
| 42 | &context)); |
| 43 | EXPECT_THAT(EvaluateWithExtensionFunction("request.path == '/'", context), |
| 44 | IsOkAndHolds(true)); |
| 45 | } |
| 46 | |
| 47 | TEST(EvaluateWithExtensionFunction, ContainsTrue) { |
| 48 | AttributeContext context; |
nothing calls this directly
no test coverage detected