UNPKG

adn

Version:

App.net API for Node

38 lines (24 loc) 759 B
var chai = require("chai"), we = it, when = describe; chai.should(); var ADN = require("../"); when("Using client-key server-side flow authentication",function() { var adnInstance = new ADN(); we("should be able to call the function",function() { adnInstance.auth.should.be.a("function"); }); we("should be able to get back an access key",function(done) { adnInstance.auth({ "kind": "appToken", "clientID": "t9kmPYhNbfxJDR59g7m6KeXrnKkT6Wgj", "clientSecret": "FNZUXHeMupNvR9XVuuFStkkTkgYGRaaH" }); adnInstance.auth.last .success(function(token) { token.should.be.a("string"); token.length.should.be.above(90); token.length.should.be.below(110); done(); }); }); });