Skip to content

Commit

Permalink
Test that the passed requestDescriptions array is not mangled.
Browse files Browse the repository at this point in the history
  • Loading branch information
papandreou committed Apr 12, 2016
1 parent b9f8524 commit f1b0f90
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/unexpectedMitm.js
Original file line number Diff line number Diff line change
Expand Up @@ -862,6 +862,13 @@ describe('unexpectedMitm', function () {
);
});

it('should not mangle the requestDescriptions array', function () {
var requestDescriptions = [ { request: 'GET /', response: 200 } ];
return expect('http://www.google.com/', 'with http mocked out', requestDescriptions, 'to yield response', 200).then(function () {
expect(requestDescriptions, 'to have length', 1);
});
});

it('should output the error if the assertion being delegated to fails', function () {
return expect(
expect('http://www.google.com/foo', 'with http mocked out', {
Expand Down

0 comments on commit f1b0f90

Please sign in to comment.