2016-05-06 04:50:59 +00:00
|
|
|
// Copyright IBM Corp. 2014,2015. All Rights Reserved.
|
|
|
|
// Node module: loopback-connector
|
|
|
|
// This file is licensed under the MIT License.
|
|
|
|
// License text available at https://opensource.org/licenses/MIT
|
|
|
|
|
2017-03-06 23:40:47 +00:00
|
|
|
'use strict';
|
2014-05-23 17:18:11 +00:00
|
|
|
var assert = require('assert');
|
|
|
|
var connector = require('../');
|
|
|
|
|
|
|
|
describe('loopback-connector', function() {
|
|
|
|
it('exports Connector', function() {
|
|
|
|
assert(connector.Connector);
|
|
|
|
});
|
|
|
|
|
|
|
|
it('exports SqlConnector', function() {
|
|
|
|
assert(connector.SqlConnector);
|
|
|
|
});
|
2015-05-13 17:14:44 +00:00
|
|
|
|
|
|
|
it('exports SQLConnector', function() {
|
|
|
|
assert(connector.SQLConnector);
|
|
|
|
});
|
|
|
|
|
|
|
|
it('creates aliases to Connector.prototype.execute', function() {
|
|
|
|
assert.equal(connector.Connector.prototype.execute,
|
|
|
|
connector.Connector.prototype.query);
|
|
|
|
assert.equal(connector.Connector.prototype.execute,
|
|
|
|
connector.Connector.prototype.command);
|
|
|
|
});
|
|
|
|
|
|
|
|
it('creates aliases to SQLConnector.prototype.execute', function() {
|
|
|
|
assert.equal(connector.SQLConnector.prototype.execute,
|
|
|
|
connector.SQLConnector.prototype.query);
|
|
|
|
assert.equal(connector.SQLConnector.prototype.execute,
|
|
|
|
connector.SQLConnector.prototype.command);
|
|
|
|
});
|
2014-05-23 17:18:11 +00:00
|
|
|
});
|