Skip to content
This repository has been archived by the owner on Jul 19, 2022. It is now read-only.

Commit

Permalink
fix optional query param
Browse files Browse the repository at this point in the history
  • Loading branch information
enciyo committed Jun 6, 2021
1 parent 81bd71c commit ca80ef5
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ internal fun Mock.isSameEndpoint(outMock: Mock) =

internal fun Mock.isSameMock(outMock: Mock) =
endpoint == outMock.endpoint &&
queryParams == outMock.queryParams && isSameRequestType(outMock)
(if (queryParams.isEmpty()) true else queryParams == outMock.queryParams) && isSameRequestType(outMock)



internal fun Mock.isSameRequestType(outMock: Mock) =
requestType == null ||
Expand Down

0 comments on commit ca80ef5

Please sign in to comment.