Permalink
Browse files

adds test for #2

  • Loading branch information...
1 parent 02b2ffd commit 0cd99ac033ba705bf261a42e4cb96a7306b3c0bd @c4milo c4milo committed Feb 27, 2012
Showing with 11 additions and 0 deletions.
  1. +11 −0 configuration/specs/apikey.spec.js
@@ -126,4 +126,15 @@ describe('ApiKey service', function(){
done();
});
});
+
+ it('should return an error if credentials are invalid', function(done) {
+ var apikeyService = new ApiKeyService('foo', 'bar');
+ apikeyService.get(function(err, keys) {
+ var errors = err.errors;
+ Array.isArray(errors).should.be.eql(true);
+ errors[0].code.should.be.eql('058');
+ errors[0].description.should.be.eql('Invalid credentials.');
+ done();
+ });
+ });
});

0 comments on commit 0cd99ac

Please sign in to comment.