2013-09-08 15:57:32 -04:00
|
|
|
module.exports = function(knex) {
|
|
|
|
|
2014-04-13 17:51:57 +10:00
|
|
|
describe('Deletes', function () {
|
2013-09-11 23:36:55 -04:00
|
|
|
|
2014-04-13 17:51:57 +10:00
|
|
|
it('should handle deletes', function() {
|
2013-09-11 23:36:55 -04:00
|
|
|
return knex('accounts')
|
2014-04-13 17:51:57 +10:00
|
|
|
.where('id', 1)
|
2014-04-16 02:50:19 -04:00
|
|
|
.del()
|
|
|
|
.testSql(function(tester) {
|
|
|
|
tester('postgresql');
|
|
|
|
});
|
2014-04-13 17:51:57 +10:00
|
|
|
});
|
2013-09-11 23:36:55 -04:00
|
|
|
|
2014-04-13 17:51:57 +10:00
|
|
|
it('should allow returning for deletes in postgresql', function() {
|
|
|
|
return knex('accounts')
|
|
|
|
.where('id', 2)
|
2014-04-16 02:50:19 -04:00
|
|
|
.del('*')
|
|
|
|
.testSql(function(tester) {
|
|
|
|
tester('postgresql');
|
|
|
|
});
|
2013-09-11 23:36:55 -04:00
|
|
|
});
|
|
|
|
|
|
|
|
});
|
|
|
|
|
2014-04-13 17:51:57 +10:00
|
|
|
};
|