Skip to content

Instantly share code, notes, and snippets.

@kenperkins
Created April 11, 2013 19:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kenperkins/5366292 to your computer and use it in GitHub Desktop.
Save kenperkins/5366292 to your computer and use it in GitHub Desktop.
it('Get server by id', function(done) {
if (mock) {
nock('http://166.78.241.239:8774')
.get('/v2/4480c6f7325340e4a12945d14b7cb852/servers/84c252ac-0527-44db-bdf3-bc9b336d14ad')
.replyWithFile(200, __dirname + '/mock/servers/200-get-server.json');
}
client.compute.getServer('84c252ac-0527-44db-bdf3-bc9b336d14ad', function(err, server) {
should.not.exist(err);
should.exist(server);
server.should.be.instanceof(Compute.Server);
server.id.should.equal('84c252ac-0527-44db-bdf3-bc9b336d14ad');
done();
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment