Skip to content

Commit

Permalink
FIX (interceptor): When multiple mocks for the same url exist it igno…
Browse files Browse the repository at this point in the history
…red active status of the mock (#262)

When having 2 or more mocks on the same route, we tried to get the first matching mock, however we did not check if the mock is disabled.
  • Loading branch information
kmichal authored and morsdyce committed Oct 20, 2018
1 parent 00640fb commit 00f3e48
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/api/interceptors/web-interceptor.js
Expand Up @@ -56,7 +56,7 @@ class WebInterceptor {

getMatchingMock(mocks, request) {
for (let mock of mocks) {
if (mock.matches(request)) {
if (mock.matches(request) && mock.isActive) {
return mock;
}
}
Expand Down

0 comments on commit 00f3e48

Please sign in to comment.