From 10ff6db5813523881206c45d8fb5f478688af335 Mon Sep 17 00:00:00 2001 From: Timothy Date: Wed, 4 Nov 2015 19:13:33 +0100 Subject: [PATCH] should only use the host when calling `nock`, and not the full uri --- test/sp.ds.requestExecutor_test.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/sp.ds.requestExecutor_test.js b/test/sp.ds.requestExecutor_test.js index 4cb0ff8b..7f83f693 100644 --- a/test/sp.ds.requestExecutor_test.js +++ b/test/sp.ds.requestExecutor_test.js @@ -74,9 +74,10 @@ describe('ds:', function () { it('should return resource error in case of incorrect request', function (done) { var cbSpy; - var uri = 'https://api.stormpath.com/v1/test'; + var host = 'https://api.stormpath.com'; + var uri = host + '/v1/test'; var res = {test: 'boom'}; - nock(uri).get('/v1/test').reply(400, res); + nock(host).get('/v1/test').reply(400, res); function cb(err, body) { err.should.be.an.instanceof(ResourceError); expect(body).to.be.null;