Skip to content

Commit

Permalink
Use assignment operator in mocks
Browse files Browse the repository at this point in the history
Additionally, simplify one test example.

Signed-off-by: Anders Eknert <anders@eknert.com>
  • Loading branch information
anderseknert committed Apr 25, 2022
1 parent c5f5145 commit e2bac69
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions docs/content/policy-testing.md
Expand Up @@ -31,10 +31,8 @@ allow {
}
allow {
some profile_id
input.path = ["users", profile_id]
input.path == ["users", input.user_id]
input.method == "GET"
profile_id == input.user_id
}
```

Expand Down Expand Up @@ -342,8 +340,8 @@ allow {
```live:with_keyword_builtins/tests:module:read_only
package authz
mock_decode_verify("my-jwt", _) = [true, {}, {}]
mock_decode_verify(x, _) = [false, {}, {}] {
mock_decode_verify("my-jwt", _) := [true, {}, {}]
mock_decode_verify(x, _) := [false, {}, {}] {
x != "my-jwt"
}
Expand Down

0 comments on commit e2bac69

Please sign in to comment.