nitrogen
Version:
Nitrogen is a platform for building connected devices. Nitrogen provides the authentication, authorization, and real time message passing framework so that you can focus on your device and application. All with a consistent development platform that lev
27 lines (19 loc) • 643 B
JavaScript
var assert = require('assert')
, config = require('../config')
, fixtures = require('../fixtures')
, nitrogen = require('../../lib');
describe('device', function() {
it('should be able to create a device', function(done) {
var service = new nitrogen.Service(config);
var device = new nitrogen.Device({
nickname: "camera",
api_key: fixtures.models.userApiKey.key
});
service.connect(device, function(err, session, principal) {
assert(!err);
assert(principal.id);
assert(principal.nickname);
done();
});
});
});