1234567891011121314151617181920212223242526272829303132333435363738394041 |
- var Test = require('../../support/convert-runner');
- describe('Converter :: ', function() {
- describe('Sums :: ', function() {
- it('should generate a sum query', function() {
- Test({
- criteria: {
- model: 'user',
- method: 'sum',
- criteria: {
- where: {
- and: [
- {
- firstName: 'Test'
- },
- {
- lastName: 'User'
- }
- ]
- }
- },
- values: 'age'
- },
- query: {
- sum: 'age',
- from: 'user',
- where: {
- and: [
- {
- firstName: 'Test'
- },
- {
- lastName: 'User'
- }
- ]
- }
- }
- });
- });
- });
- });
|