diff --git a/test/remotes.js b/test/remotes.js index ce5f60a9..7cf5cd63 100644 --- a/test/remotes.js +++ b/test/remotes.js @@ -22,6 +22,19 @@ describe('component install from remote', function(){ }), done); }) + before(function(done){ + mkdir('test/private-registry/testdependencies/master', done); + }) + + before(function(done){ + fs.writeFile('test/private-registry/testdependencies/master/component.json', JSON.stringify({ + name: 'testdependencies', + repo: 'private-registry/testdependencies', + remotes: ['http://localhost:3000'], + dependencies: {'private-registry/testcomponent': "*"} + }), done); + }) + before(function(done){ app.use(express.static(__dirname)); app.listen(3000, done); @@ -63,6 +76,22 @@ describe('component install from remote', function(){ done(); }) }) + + it('should install private dependencies', function(done){ + exec('bin/component install private-registry/testdependencies', function(err, stdout, stderr){ + if (err) return done(err); + stdout.should.include('install'); + stdout.should.include('dep'); + stdout.should.include('complete'); + var json = require(path.resolve('components/private-registry-testdependencies/component.json')); + json.name.should.equal('testdependencies'); + json.repo.should.equal('private-registry/testdependencies'); + json = require(path.resolve('components/private-registry-testcomponent/component.json')); + json.name.should.equal('testcomponent'); + json.repo.should.equal('private-registry/testcomponent'); + done(); + }) + }) }) describe('with authentication', function(){