Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Converted remaining tests to new syntax

  • Loading branch information...
commit ab5f36246a25946045dca342bce3d63c48d184d1 1 parent af0efc7
@bbyars authored
Showing with 6 additions and 6 deletions.
  1. +6 −6 server/test/unit/protocols/http/stubbing.test.js
View
12 server/test/unit/protocols/http/stubbing.test.js
@@ -25,7 +25,7 @@ exports['HTTP Stubbing'] = testCase({
test.wasCalled(this.response.write, withArgs(''));
test.wasCalled(this.response.end);
test.done();
- }/*,
+ },
'should return stub if path matches': function (test) {
this.request.url = '/test';
@@ -40,16 +40,16 @@ exports['HTTP Stubbing'] = testCase({
this.stubber.middleware(this.request, this.response);
- test.ok(this.response.writeHead.wasCalledWith(400, {
+ test.wasCalled(this.response.writeHead, withArgs(400, {
'Connection': 'close',
'Content-Type': 'text/plain'
}));
- test.ok(this.response.write.wasCalledWith('Testing 1..2..3..'));
+ test.wasCalled(this.response.write, withArgs('Testing 1..2..3..'));
test.done();
},
'should not return stub if path does not match': function (test) {
- this.request.url = '/';
+ this.request.url = '/different';
this.stubber.addStub({
path: '/test',
response: { body: 'Testing 1..2..3..' }
@@ -57,7 +57,7 @@ exports['HTTP Stubbing'] = testCase({
this.stubber.middleware(this.request, this.response);
- test.ok(this.response.write.wasCalledWith(''));
+ test.wasCalled(this.response.write, withArgs(''));
test.done();
- }*/
+ }
});

0 comments on commit ab5f362

Please sign in to comment.
Something went wrong with that request. Please try again.