Skip to content

Commit

Permalink
use real http request when testing file and archive
Browse files Browse the repository at this point in the history
  • Loading branch information
timaschew committed Sep 21, 2014
1 parent 8a3b646 commit 5960029
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions test/github.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}))
})
})

0 comments on commit 5960029

Please sign in to comment.