sequelizer.from.test.js 514 B

1234567891011121314151617
  1. var Sequelizer = require('../../../index')({ dialect: 'postgres' }).sequelizer;
  2. var analyze = require('../../support/analyze');
  3. var assert = require('assert');
  4. describe('Sequelizer ::', function() {
  5. describe('FROM statements', function() {
  6. it('should generate a simple query with a FROM statement', function() {
  7. var tree = analyze({
  8. select: ['*'],
  9. from: 'books'
  10. });
  11. var result = Sequelizer(tree);
  12. assert.equal(result.sql, 'select * from "books"');
  13. });
  14. });
  15. });