I have a test with dates that I would like to make dynamic to not have to change them in the future
the correct Json should look like :
private static final String FAKE_RESPONSE_JSON = '[{"locactionName":"Bamboo", "startDate": "2021-07-25", "endDate":"2021-07-29"}]';
To make it more dynamic and test past date I would like to have something like System.today() - 1 but the json ask for a string.
So I tried to use String.valueOf(System.today() - 1)
but I get the errors: System.JSONException: Unexpected character (':' (code 58)): expected a valid value (number, String, array, object, 'true', 'false' or 'null') at [line:1, column:45]
Any idea how I could do it ? thx you