upgraded pact-web and pact-jvm-provider-spring
This commit is contained in:
12
pact-angular/package-lock.json
generated
12
pact-angular/package-lock.json
generated
@@ -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",
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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));
|
||||
});
|
||||
|
||||
@@ -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')
|
||||
}
|
||||
|
||||
@@ -10,4 +10,5 @@ include 'sleuth-upstream-service'
|
||||
include 'rabbitmq-event-brokering'
|
||||
include 'junit5'
|
||||
include 'pact-spring-provider'
|
||||
include 'spring-boot-tests'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user