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:
Marcin Grzejszczak
2016-10-11 11:27:10 +02:00
parent 4313717e01
commit b17238ff4e
26 changed files with 498 additions and 29 deletions

View File

@@ -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)

View File

@@ -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: