create-each.test.js 676 B

123456789101112131415161718192021222324252627282930313233
  1. var Test = require('../../support/convert-runner');
  2. describe('Converter :: ', function() {
  3. describe('Create Each :: ', function() {
  4. it('should generate a create each query', function() {
  5. Test({
  6. criteria: {
  7. model: 'user',
  8. method: 'createEach',
  9. values: [
  10. {
  11. firstName: 'foo'
  12. },
  13. {
  14. firstName: 'bar'
  15. }
  16. ]
  17. },
  18. query: {
  19. insert: [
  20. {
  21. firstName: 'foo'
  22. },
  23. {
  24. firstName: 'bar'
  25. }
  26. ],
  27. into: 'user'
  28. }
  29. });
  30. });
  31. });
  32. });