diff --git a/test/services/glacier.spec.coffee b/test/services/glacier.spec.coffee index 91c56c1bd6..01d90b20aa 100644 --- a/test/services/glacier.spec.coffee +++ b/test/services/glacier.spec.coffee @@ -20,16 +20,17 @@ describe 'AWS.Glacier.Client', -> client = new AWS.Glacier.Client() describe 'building requests', -> - beforeEach -> - helpers.mockHttpResponse 200, {}, 'response' - it 'sets accountId to "-" if not set', -> - resp = client.listVaults().send() - expect(resp.request.httpRequest.path).toEqual('/-/vaults') + req = client.listVaults() + req.emit('validate', req) + req.emit('build', req) + expect(req.httpRequest.path).toEqual('/-/vaults') it 'will not override accountId if set', -> - resp = client.listVaults(accountId: 'ABC123').send() - expect(resp.request.httpRequest.path).toEqual('/ABC123/vaults') + req = client.listVaults(accountId: 'ABC123') + req.emit('validate', req) + req.emit('build', req) + expect(req.httpRequest.path).toEqual('/ABC123/vaults') describe 'computeChecksums', -> it 'returns correct linear and tree hash for buffer data', -> diff --git a/test/services/route53.spec.coffee b/test/services/route53.spec.coffee index 5a3993d479..986e533778 100644 --- a/test/services/route53.spec.coffee +++ b/test/services/route53.spec.coffee @@ -31,9 +31,11 @@ describe 'AWS.Route53.Client', -> client = new AWS.Route53.Client it 'should fix hosted zone ID on input', -> - resp = client.getHostedZone(Id: '/hostedzone/ABCDEFG').send() - expect(resp.request.httpRequest.path).toMatch('/hostedzone/ABCDEFG$') + req = client.getHostedZone(Id: '/hostedzone/ABCDEFG') + req.emit('build', req) + expect(req.httpRequest.path).toMatch('/hostedzone/ABCDEFG$') it 'should fix health check ID on input', -> - resp = client.getHealthCheck(HealthCheckId: '/healthcheck/ABCDEFG').send() - expect(resp.request.httpRequest.path).toMatch('/healthcheck/ABCDEFG$') + req = client.getHealthCheck(HealthCheckId: '/healthcheck/ABCDEFG') + req.emit('build', req) + expect(req.httpRequest.path).toMatch('/healthcheck/ABCDEFG$')