Skip to content

Commit

Permalink
test(java-sdk): add contextual_tuples to expand test assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
ewanharris committed Dec 18, 2024
1 parent 8f0a6c2 commit f696b8c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion config/clients/java/template/OpenFgaApiTest.java.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -1424,7 +1424,7 @@ public class OpenFgaApiTest {
// Given
String postPath = "https://api.fga.example/stores/01YCP46JKYM8FJCQ37NMBYHE5X/expand";
String expectedBody = String.format(
"{\"tuple_key\":{\"relation\":\"%s\",\"object\":\"%s\"},\"authorization_model_id\":\"%s\",\"consistency\":\"%s\"}",
"{\"tuple_key\":{\"relation\":\"%s\",\"object\":\"%s\"},\"authorization_model_id\":\"%s\",\"consistency\":\"%s\",\"contextual_tuples\":null}",
DEFAULT_RELATION, DEFAULT_OBJECT, DEFAULT_AUTH_MODEL_ID, ConsistencyPreference.HIGHER_CONSISTENCY);
String responseBody = String.format(
"{\"tree\":{\"root\":{\"union\":{\"nodes\":[{\"leaf\":{\"users\":{\"users\":[\"%s\"]}}}]}}}}",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1829,8 +1829,7 @@ public class OpenFgaClientTest {
// Given
String postPath = "https://api.fga.example/stores/01YCP46JKYM8FJCQ37NMBYHE5X/expand";
String expectedBody = String.format(
"{\"tuple_key\":{\"relation\":\"%s\",\"object\":\"%s\"},\"authorization_model_id\":\"%s\",\"consistency\":\"%s\"}",
DEFAULT_RELATION, DEFAULT_OBJECT, DEFAULT_AUTH_MODEL_ID, ConsistencyPreference.HIGHER_CONSISTENCY);
"{\"tuple_key\":{\"relation\":\"%s\",\"object\":\"%s\"},\"authorization_model_id\":\"%s\",\"consistency\":\"%s\",\"contextual_tuples\":null}", DEFAULT_RELATION, DEFAULT_OBJECT, DEFAULT_AUTH_MODEL_ID, ConsistencyPreference.HIGHER_CONSISTENCY);
String responseBody = String.format(
"{\"tree\":{\"root\":{\"union\":{\"nodes\":[{\"leaf\":{\"users\":{\"users\":[\"%s\"]}}}]}}}}",
DEFAULT_USER);
Expand Down

0 comments on commit f696b8c

Please sign in to comment.