upgraded pact-web and pact-jvm-provider-spring

This commit is contained in:
Tom Hombergs
2018-01-02 23:01:38 +01:00
parent c9ae2ca600
commit 7bce17b055
5 changed files with 14 additions and 13 deletions

View File

@@ -264,6 +264,12 @@
"bunyan-prettystream": "0.1.3"
}
},
"@pact-foundation/pact-web": {
"version": "5.3.0",
"resolved": "https://registry.npmjs.org/@pact-foundation/pact-web/-/pact-web-5.3.0.tgz",
"integrity": "sha512-8nSX7fFdfUm/ApbACBFCU+aYF0xom7goIHOCn7MUvE+zIgmSUnX1Gl82SiZsJjpuVAfYclMeUwaY5VliadfMrA==",
"dev": true
},
"@schematics/angular": {
"version": "0.0.49",
"resolved": "https://registry.npmjs.org/@schematics/angular/-/angular-0.0.49.tgz",
@@ -5532,12 +5538,6 @@
"integrity": "sha512-r6zKACMNhjPJMTl8KcFH4li//gkrXWfbD6feV8l6doRHlzljFWGJ2AP6iKaCJXyZmAUMOPtvbW7EXkbWO/pLEA==",
"dev": true
},
"pact-web": {
"version": "4.3.1",
"resolved": "https://registry.npmjs.org/pact-web/-/pact-web-4.3.1.tgz",
"integrity": "sha1-D63FAjQYIy1wfj2APEB7g/OIu78=",
"dev": true
},
"pako": {
"version": "0.2.9",
"resolved": "https://registry.npmjs.org/pako/-/pako-0.2.9.tgz",

View File

@@ -48,7 +48,7 @@
"typescript": "~2.3.3",
"@pact-foundation/pact-node": "6.5.0",
"@pact-foundation/karma-pact": "2.1.3",
"pact-web": "4.3.1",
"@pact-foundation/pact-web": "5.3.0",
"cross-env": "^5.0.5"
}
}

View File

@@ -2,14 +2,14 @@ import {TestBed} from '@angular/core/testing';
import {HttpClientModule} from '@angular/common/http';
import {UserService} from './user.service';
import {User} from './user';
import * as Pact from 'pact-web';
import {PactWeb, Matchers} from '@pact-foundation/pact-web';
describe('UserService', () => {
let provider;
beforeAll(function (done) {
provider = Pact({
provider = new PactWeb({
consumer: 'ui',
provider: 'userservice',
port: 1234,
@@ -70,7 +70,7 @@ describe('UserService', () => {
},
willRespondWith: {
status: 201,
body: Pact.Matchers.somethingLike({
body: Matchers.somethingLike({
id: createdUserId
}),
headers: {
@@ -106,14 +106,14 @@ describe('UserService', () => {
withRequest: {
method: 'PUT',
path: '/user-service/users/42',
body: Pact.Matchers.somethingLike(expectedUser),
body: Matchers.somethingLike(expectedUser),
headers: {
'Content-Type': 'application/json'
}
},
willRespondWith: {
status: 200,
body: Pact.Matchers.somethingLike(expectedUser)
body: Matchers.somethingLike(expectedUser)
}
}).then(done, error => done.fail(error));
});

View File

@@ -26,7 +26,7 @@ dependencies {
compile('org.springframework.boot:spring-boot-starter-data-jpa')
compile('org.springframework.boot:spring-boot-starter-web')
compile('com.h2database:h2:1.4.196')
testCompile('au.com.dius:pact-jvm-provider-spring_2.12:3.5.9')
testCompile('au.com.dius:pact-jvm-provider-spring_2.12:3.5.11')
testCompile('junit:junit:4.12')
testCompile('org.springframework.boot:spring-boot-starter-test')
}

View File

@@ -10,4 +10,5 @@ include 'sleuth-upstream-service'
include 'rabbitmq-event-brokering'
include 'junit5'
include 'pact-spring-provider'
include 'spring-boot-tests'