From 59600293d44c5679da92de97cc2371a458d2a21c Mon Sep 17 00:00:00 2001 From: Anton Wilhelm Date: Sun, 21 Sep 2014 20:04:24 +0200 Subject: [PATCH] use real http request when testing file and archive --- test/github.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/test/github.js b/test/github.js index 66a5f07..ad533c2 100644 --- a/test/github.js +++ b/test/github.js @@ -115,15 +115,18 @@ describe('GitHub Remote', function () { describe('.file()', function () { it('should return an array', co(function* () { var files = remote.file('component/emitter', '1.1.1', 'component.json'); - files.length.should.be.ok; + var result = yield* remote.request(files[0], true); + result.res.statusCode.should.equal(200); })) }) describe('.archive()', function () { it('should return an object', co(function* () { var archive = remote.archive('component/emitter'); - archive.zip.length.should.be.ok; - archive.tar.length.should.be.ok; + var zipResult = yield* remote.request(archive.zip[0]); + var tarResult = yield* remote.request(archive.tar[0]); + zipResult.res.statusCode.should.equal(200); + tarResult.res.statusCode.should.equal(200); })) }) }) \ No newline at end of file