Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
!gradle/wrapper/gradle-wrapper.jar
*.class
bin/main/application.yaml
bin/contractTest/
bin/functionalTest/
bin/integrationTest/
bin/main/
bin/test/

### STS ###
.apt_generated
Expand Down
36 changes: 2 additions & 34 deletions pacts/prl-dgs-api-CCD_CASE_DOCS_AM_API.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,7 @@
}
},
"response": {
"status": 200,
"headers": {
"Content-Type": "application/vnd\u63AFuk\u98E0gov\u8E83hmcts\uED68dm\u347Adocument\u7C16v1haljson;charset=UTF-8"
},
"matchingRules": {
"header": {
"Content-Type": {
"matchers": [
{
"match": "regex",
"regex": "application/vnd.uk.gov.hmcts.dm.document.v1+hal+json;charset=UTF-8"
}
],
"combine": "AND"
}
}
}
"status": 200
},
"providerStates": [
{
Expand All @@ -51,23 +35,7 @@
}
},
"response": {
"status": 500,
"headers": {
"Content-Type": "application/vnd\uF5A0uk\uE1D7gov\u0205hmcts\u0E15dm\uCDCDdocument\u0B01v111haljson;charset=UTF-8"
},
"matchingRules": {
"header": {
"Content-Type": {
"matchers": [
{
"match": "regex",
"regex": "application/vnd.uk.gov.hmcts.dm.document.v1+hal+json;charset=UTF-8"
}
],
"combine": "AND"
}
}
}
"status": 500
},
"providerStates": [
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package uk.gov.hmcts.reform.prl.documentgenerator;

import au.com.dius.pact.consumer.MockServer;
import au.com.dius.pact.consumer.dsl.PactDslJsonBody;
import au.com.dius.pact.consumer.dsl.PactDslWithProvider;
import au.com.dius.pact.consumer.junit5.PactConsumerTestExt;
import au.com.dius.pact.consumer.junit5.PactTestFor;
Expand Down Expand Up @@ -67,8 +66,6 @@ RequestResponsePact downloadDocument(PactDslWithProvider builder) throws JSONExc
.headers(AUTHORIZATION_HEADER, someAuthToken)
.path("/cases/documents/" + someDocumentId)
.willRespondWith()
.matchHeader(org.springframework.http.HttpHeaders.CONTENT_TYPE,
"application/vnd.uk.gov.hmcts.dm.document.v1+hal+json;charset=UTF-8")
.status(HttpStatus.SC_OK)
.toPact();
}
Expand Down Expand Up @@ -97,8 +94,6 @@ RequestResponsePact noAuthDownloadDocument(PactDslWithProvider builder) throws J
.headers(SERVICE_AUTHORIZATION_HEADER, invalidServiceAuthToken)
.path("/cases/documents/" + someDocumentId)
.willRespondWith()
.matchHeader(org.springframework.http.HttpHeaders.CONTENT_TYPE,
"application/vnd.uk.gov.hmcts.dm.document.v1+hal+json;charset=UTF-8")
.status(HttpStatus.SC_INTERNAL_SERVER_ERROR)
.toPact();
}
Expand All @@ -119,11 +114,6 @@ public void verifyNoAuthDownloadDocument(MockServer mockServer) throws IOExcepti
RequestResponsePact uploadDocument(PactDslWithProvider builder) throws JSONException, IOException {
// @formatter:off

PactDslJsonBody body = new PactDslJsonBody()
.stringMatcher("caseTypeId", "PRLAPPS")
.stringMatcher("jurisdictionId", "PRIVATELAW")
.asBody();

return builder
.given("A request to upload a document")
.uponReceiving("a request to upload a document with valid authorization")
Expand Down