Merge branch '2.1.x'
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
|
||||
package org.springframework.cloud.contract.spec.internal
|
||||
|
||||
|
||||
import spock.lang.Issue
|
||||
import spock.lang.Specification
|
||||
|
||||
import org.springframework.cloud.contract.spec.Contract
|
||||
@@ -445,4 +445,23 @@ then:
|
||||
expect:
|
||||
contract != null
|
||||
}
|
||||
|
||||
@Issue("1200")
|
||||
def 'should fail when regex do not match the concrete value'() {
|
||||
when:
|
||||
Contract.make {
|
||||
request {
|
||||
method 'GET'
|
||||
url '/any'
|
||||
}
|
||||
response {
|
||||
status OK()
|
||||
body([
|
||||
time: $(p(regex(iso8601WithOffset())),c( "thisIsNotADate"))
|
||||
])
|
||||
}
|
||||
}
|
||||
then:
|
||||
thrown(IllegalStateException)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user