@@ -68,30 +68,30 @@ describe('insert()', function() {
6868 it ( 'should allow for an empty data parameter' , function ( ) {
6969 qb . reset_query ( ) ;
7070 var sql = qb . insert ( 'galaxies' ) ;
71- sql . should . eql ( "INSERT INTO ( `galaxies`) () VALUES ()" ) ;
71+ sql . should . eql ( "INSERT INTO `galaxies` () VALUES ()" ) ;
7272 } ) ;
7373 it ( 'should utilize pre-existing tables set in from_array' , function ( ) {
7474 qb . reset_query ( ) ;
7575 qb . from ( 'galaxies' ) ;
7676 var sql = qb . insert ( ) ;
77- sql . should . eql ( "INSERT INTO ( `galaxies`) () VALUES ()" ) ;
77+ sql . should . eql ( "INSERT INTO `galaxies` () VALUES ()" ) ;
7878 } ) ;
7979 it ( 'should utilize pre-existing values set in in set_array' , function ( ) {
8080 qb . reset_query ( ) ;
8181 qb . set ( test_data ) ;
8282 var sql = qb . insert ( 'galaxies' ) ;
83- sql . should . eql ( "INSERT INTO ( `galaxies`) (`id`, `name`, `type`) VALUES (3, 'Milky Way', 'spiral')" ) ;
83+ sql . should . eql ( "INSERT INTO `galaxies` (`id`, `name`, `type`) VALUES (3, 'Milky Way', 'spiral')" ) ;
8484 } ) ;
8585 it ( 'should utilize pre-existing tables and values from from_aray and set_array, respectively' , function ( ) {
8686 qb . reset_query ( ) ;
8787 qb . from ( 'galaxies' ) . set ( test_data ) ;
8888 var sql = qb . insert ( ) ;
89- sql . should . eql ( "INSERT INTO ( `galaxies`) (`id`, `name`, `type`) VALUES (3, 'Milky Way', 'spiral')" ) ;
89+ sql . should . eql ( "INSERT INTO `galaxies` (`id`, `name`, `type`) VALUES (3, 'Milky Way', 'spiral')" ) ;
9090 } ) ;
9191 it ( 'should accept a non-empty object for the data parameter' , function ( ) {
9292 qb . reset_query ( ) ;
9393 var sql = qb . insert ( 'galaxies' , test_data ) ;
94- sql . should . eql ( "INSERT INTO ( `galaxies`) (`id`, `name`, `type`) VALUES (3, 'Milky Way', 'spiral')" ) ;
94+ sql . should . eql ( "INSERT INTO `galaxies` (`id`, `name`, `type`) VALUES (3, 'Milky Way', 'spiral')" ) ;
9595 } ) ;
9696 it ( 'should convert call to insert_batch() if an array of non-emtpy objects is passed in the data parameter' , function ( ) {
9797 qb . reset_query ( ) ;
@@ -127,7 +127,7 @@ describe('insert_ignore()', function() {
127127 it ( 'should create an INSERT IGNORE statement' , function ( ) {
128128 qb . reset_query ( ) ;
129129 var sql = qb . insert_ignore ( 'galaxies' , test_data ) ;
130- sql . should . eql ( "INSERT IGNORE INTO ( `galaxies`) (`id`, `name`, `type`) VALUES (3, 'Milky Way', 'spiral')" ) ;
130+ sql . should . eql ( "INSERT IGNORE INTO `galaxies` (`id`, `name`, `type`) VALUES (3, 'Milky Way', 'spiral')" ) ;
131131 } ) ;
132132 it ( 'should be just a wrapper of insert() that passes true to the 3rd parameter' , function ( ) {
133133 qb . reset_query ( ) ;
@@ -138,11 +138,11 @@ describe('insert_ignore()', function() {
138138 it ( 'should convert to insert_batch() if an array of data is supplied to second parameter' , function ( ) {
139139 qb . reset_query ( ) ;
140140 var sql = qb . insert_ignore ( 'galaxies' , test_data_set ) ;
141- sql . should . eql ( "INSERT IGNORE INTO ( `galaxies`) (`id`, `name`, `type`) VALUES (3, 'Milky Way', 'spiral'), (4, 'Andromeda', 'spiral')" ) ;
141+ sql . should . eql ( "INSERT IGNORE INTO `galaxies` (`id`, `name`, `type`) VALUES (3, 'Milky Way', 'spiral'), (4, 'Andromeda', 'spiral')" ) ;
142142 } ) ;
143143 it ( 'should support the "on_dupe" suffix parameter... effectively appending to the query anything supplied in this parameter' , function ( ) {
144144 qb . reset_query ( ) ;
145145 var sql = qb . insert_ignore ( 'galaxies' , test_data , 'ON DUPLICATE KEY UPDATE last_update = NOW()' ) ;
146- sql . should . eql ( "INSERT IGNORE INTO ( `galaxies`) (`id`, `name`, `type`) VALUES (3, 'Milky Way', 'spiral') ON DUPLICATE KEY UPDATE last_update = NOW()" ) ;
146+ sql . should . eql ( "INSERT IGNORE INTO `galaxies` (`id`, `name`, `type`) VALUES (3, 'Milky Way', 'spiral') ON DUPLICATE KEY UPDATE last_update = NOW()" ) ;
147147 } ) ;
148148} ) ;
0 commit comments