Fixing missing context-path usage
without this change when the user adds context-path it gets ignored and WireMock fails to register stubs with this change we update the WireMock instance to include the context path fixes #99
This commit is contained in:
@@ -201,7 +201,7 @@ The aforementioned contract is an agreement between two sides that:
|
||||
|
||||
- if an HTTP request is sent with
|
||||
** a method `PUT` on an endpoint `/fraudcheck`
|
||||
** JSON body with `clientId` matching the regular expression `[0-9]{10}` and `loanAmount` equal to `99999`
|
||||
** JSON body with `clientPesel` matching the regular expression `[0-9]{10}` and `loanAmount` equal to `99999`
|
||||
** and with a header `Content-Type` equal to `application/vnd.fraud.v1+json`
|
||||
- then an HTTP response would be sent to the consumer that
|
||||
** has status `200`
|
||||
@@ -375,7 +375,7 @@ public void validate_shouldMarkClientAsFraud() throws Exception {
|
||||
// given:
|
||||
MockMvcRequestSpecification request = given()
|
||||
.header("Content-Type", "application/vnd.fraud.v1+json")
|
||||
.body("{\"clientId\":\"1234567890\",\"loanAmount\":99999}");
|
||||
.body("{\"clientPesel\":\"1234567890\",\"loanAmount\":99999}");
|
||||
|
||||
// when:
|
||||
ResponseOptions response = given().spec(request)
|
||||
|
||||
@@ -285,7 +285,7 @@ class LoanApplicationServiceSpec extends Specification {
|
||||
def 'should successfully apply for loan'() {
|
||||
given:
|
||||
LoanApplication application =
|
||||
new LoanApplication(client: new Client(pesel: '12345678901'), amount: 123.123)
|
||||
new LoanApplication(client: new Client(clientPesel: '12345678901'), amount: 123.123)
|
||||
when:
|
||||
LoanApplicationResult loanApplication == sut.loanApplication(application)
|
||||
then:
|
||||
|
||||
Reference in New Issue
Block a user