Handle any method as mock request method

This commit is contained in:
Piotr Fus 2023-05-28 18:46:16 +02:00
parent 8ba339b8a0
commit 374947847d
4 changed files with 29 additions and 2 deletions

View file

@ -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) {