Handle any method as mock request method
This commit is contained in:
parent
8ba339b8a0
commit
374947847d
4 changed files with 29 additions and 2 deletions
|
@ -60,7 +60,7 @@ class Mock implements Comparable<Mock> {
|
|||
|
||||
boolean match(Method method, MockRequest request) {
|
||||
boolean usesCondition = hasLimitedUses() ? usesLeft > 0 : true
|
||||
return usesCondition && this.method == method && predicate(request)
|
||||
return usesCondition && (this.method == method || this.method == Method.ANY_METHOD) && predicate(request)
|
||||
}
|
||||
|
||||
MockResponse apply(MockRequest request) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue