UNPKG

regard

Version:

Sugar-interface to access multiple data sources.

30 lines (23 loc) 781 B
var _ = require('lodash'), Chai = require('chai'), Connector = require('../../lib/connector'), HttpsConnector = require('../../lib/connectors/https'); var expect = Chai.expect; var clazz = HttpsConnector, foo, bar; describe('HttpsConnector', function () { it('should have key equals to its filename ("https")', function () { foo = clazz(); foo.init(); expect(foo.key).to.eql(Connector.generateKey('../../lib/connectors/https')); }); it('should init with security params', function () { foo = clazz(); expect(foo.context.ssl).to.be.ok; }); it('should accept path starts with "https://"', function () { foo = clazz(); expect(foo.checkPath('https://')).to.be.ok; expect(foo.checkPath('http://')).to.not.be.ok; }); });