All files / db rethinkdbdash.spec.js

100% Statements 12/12
100% Branches 0/0
100% Functions 4/4
100% Lines 12/12
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 251x 1x 1x   1x   1x   1x   1x 1x   1x   1x   1x 1x            
import RethinkDBHashDriver from './rethinkdbdash';
import chai from 'chai';
chai.should();
 
describe('RethinkDBDashDriver', () => {
 
  describe('constructor', () => {
 
    it('instantiates with an instance and table name', () => {
 
      const instance = {
        table(userTableName) { return userTableName; }
      };
      const userTableName = 'users';
 
      const db = new RethinkDBHashDriver(instance, userTableName);
 
      db.r.should.equal(instance);
      db.users.should.equal(userTableName);
    });
 
  });
 
});