Closed natenho closed 8 months ago
It is also reproducible in the current version 1.9.0, considering the following template:
{
"request": {
"method": "GET",
"route": "hello/{message}",
"condition": "<#= this.Should.GenerateError() #>"
},
"response": {
"body": {
"error": "this should not be returned!"
}
}
}
Prerequisites
Description
When the condition expression has an error, the condition is completely ignored, returning the mock.
Steps to reproduce
Using this template:
Then call the request without the query parameter "missing"
Expected behavior
HTTP 501 In this case, the condition should not match, the mock should not be returned.
Screenshots
Additional context
Mockaco Version 1.8.1