Skip to content
Browse files

fix test to compensate for repos.create()

  • Loading branch information...
1 parent 70483cc commit bef80f75808de533bb6d44f0086b82bddd173e54 @substack committed
Showing with 10 additions and 3 deletions.
  1. +10 −3 test/reject.js
View
13 test/reject.js
@@ -12,7 +12,7 @@ var http = require('http');
var seq = require('seq');
test('create, push to, and clone a repo', function (t) {
- t.plan(8);
+ t.plan(9);
var repoDir = '/tmp/' + Math.floor(Math.random() * (1<<30)).toString(16);
var srcDir = '/tmp/' + Math.floor(Math.random() * (1<<30)).toString(16);
@@ -65,8 +65,15 @@ test('create, push to, and clone a repo', function (t) {
ps.stderr.pipe(process.stderr, { end : false });
ps.on('exit', function (code) {
t.notEqual(code, 0);
- exists(repoDir + '/doom', function (ex) {
- t.equal(ex, false);
+
+ var glog = spawn('git', [ 'log' ], { cwd : repoDir + '/doom' });
+ glog.on('exit', function (code) {
+ t.notEqual(code, 0);
+ });
+ var data = '';
+ glog.stderr.on('data', function (buf) { data += buf });
+ glog.stderr.on('end', function (buf) {
+ t.ok(/bad default revision 'HEAD'/.test(data));
});
});
})

0 comments on commit bef80f7

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