Skip to content

Commit 0409649

Browse files
committed
Fixed broken test
springfox#1306
1 parent 1efb9e2 commit 0409649

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

swagger-contract-tests/src/test/groovy/springfox/test/contract/swaggertests/FunctionContractSpec.groovy

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ import spock.lang.Shared
2222
import spock.lang.Specification
2323
import spock.lang.Unroll
2424

25-
import static groovy.json.JsonOutput.*
2625
import static org.skyscreamer.jsonassert.JSONCompareMode.*
2726

2827
@WebAppConfiguration
@@ -53,7 +52,8 @@ public class FunctionContractSpec extends Specification implements FileAccess {
5352
then:
5453
String raw = response.body
5554
response.statusCode == HttpStatus.OK
56-
println(prettyPrint(raw))
55+
//Uncomment this to see a better json diff when tests fail
56+
// println(prettyPrint(raw))
5757

5858
def withPortReplaced = contract.replaceAll("__PORT__", "$port")
5959
JSONAssert.assertEquals(withPortReplaced, raw, JSONCompareMode.NON_EXTENSIBLE)
@@ -178,9 +178,9 @@ public class FunctionContractSpec extends Specification implements FileAccess {
178178

179179
@Configuration
180180
@ComponentScan([
181-
"springfox.documentation.spring.web.dummy.controllers",
182-
"springfox.test.contract.swagger",
183-
"springfox.petstore.controller"
181+
"springfox.documentation.spring.web.dummy.controllers",
182+
"springfox.test.contract.swagger",
183+
"springfox.petstore.controller"
184184
])
185185
@Import([SecuritySupport, Swagger12TestConfig, Swagger2TestConfig])
186186
static class Config {

swagger-contract-tests/src/test/resources/contract/swagger/resource-listing.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
"position": 0
88
},
99
{
10-
"description": "Bug Controller",
11-
"path": "/default/bug-controller",
10+
"description": "Bugs Controller",
11+
"path": "/default/bugs-controller",
1212
"position": 0
1313
},
1414
{

swagger-contract-tests/src/test/resources/contract/swagger2/declaration-bugs-service.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
"basePath": "/",
1818
"tags": [
1919
{
20-
"name": "bug-controller",
21-
"description": "Bug Controller"
20+
"name": "bugs-controller",
21+
"description": "Bugs Controller"
2222
}
2323
],
2424
"produces": [
@@ -29,7 +29,7 @@
2929
"/bugs/1306{?paramMap}": {
3030
"post": {
3131
"tags": [
32-
"bug-controller"
32+
"bugs-controller"
3333
],
3434
"summary": "bug1306",
3535
"operationId": "bug1306UsingPOST_1",

0 commit comments

Comments
 (0)