Skip to content

Commit 7bce17b

Browse files
committed
upgraded pact-web and pact-jvm-provider-spring
1 parent c9ae2ca commit 7bce17b

File tree

5 files changed

+14
-13
lines changed

5 files changed

+14
-13
lines changed

pact-angular/package-lock.json

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pact-angular/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
"typescript": "~2.3.3",
4949
"@pact-foundation/pact-node": "6.5.0",
5050
"@pact-foundation/karma-pact": "2.1.3",
51-
"pact-web": "4.3.1",
51+
"@pact-foundation/pact-web": "5.3.0",
5252
"cross-env": "^5.0.5"
5353
}
5454
}

pact-angular/src/app/user.service.pact.spec.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ import {TestBed} from '@angular/core/testing';
22
import {HttpClientModule} from '@angular/common/http';
33
import {UserService} from './user.service';
44
import {User} from './user';
5-
import * as Pact from 'pact-web';
5+
import {PactWeb, Matchers} from '@pact-foundation/pact-web';
66

77
describe('UserService', () => {
88

99
let provider;
1010

1111
beforeAll(function (done) {
12-
provider = Pact({
12+
provider = new PactWeb({
1313
consumer: 'ui',
1414
provider: 'userservice',
1515
port: 1234,
@@ -70,7 +70,7 @@ describe('UserService', () => {
7070
},
7171
willRespondWith: {
7272
status: 201,
73-
body: Pact.Matchers.somethingLike({
73+
body: Matchers.somethingLike({
7474
id: createdUserId
7575
}),
7676
headers: {
@@ -106,14 +106,14 @@ describe('UserService', () => {
106106
withRequest: {
107107
method: 'PUT',
108108
path: '/user-service/users/42',
109-
body: Pact.Matchers.somethingLike(expectedUser),
109+
body: Matchers.somethingLike(expectedUser),
110110
headers: {
111111
'Content-Type': 'application/json'
112112
}
113113
},
114114
willRespondWith: {
115115
status: 200,
116-
body: Pact.Matchers.somethingLike(expectedUser)
116+
body: Matchers.somethingLike(expectedUser)
117117
}
118118
}).then(done, error => done.fail(error));
119119
});

pact-spring-provider/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ dependencies {
2626
compile('org.springframework.boot:spring-boot-starter-data-jpa')
2727
compile('org.springframework.boot:spring-boot-starter-web')
2828
compile('com.h2database:h2:1.4.196')
29-
testCompile('au.com.dius:pact-jvm-provider-spring_2.12:3.5.9')
29+
testCompile('au.com.dius:pact-jvm-provider-spring_2.12:3.5.11')
3030
testCompile('junit:junit:4.12')
3131
testCompile('org.springframework.boot:spring-boot-starter-test')
3232
}

settings.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@ include 'sleuth-upstream-service'
1010
include 'rabbitmq-event-brokering'
1111
include 'junit5'
1212
include 'pact-spring-provider'
13+
include 'spring-boot-tests'
1314

0 commit comments

Comments
 (0)