Skip to content

Commit 7f3b4d6

Browse files
Alireza Ahmadialireza-ahmadi
Alireza Ahmadi
authored andcommitted
Fix code style inconsistencies in ilike tests
1 parent 2706edd commit 7f3b4d6

File tree

1 file changed

+16
-15
lines changed

1 file changed

+16
-15
lines changed

test/postgresql.test.js

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -231,21 +231,8 @@ describe('postgresql connector', function() {
231231
});
232232

233233
context('pattern matching operators', function() {
234-
before(function deleteTestFixtures(done) {
235-
Post.destroyAll(done);
236-
});
237-
before(function createTextFixtures(done) {
238-
Post.create([{
239-
title: 't1',
240-
content: 'T1_TestCase',
241-
}, {
242-
title: 't2',
243-
content: 'T2_TheOtherCase',
244-
}], done);
245-
});
246-
after(function deleteTestFixtures(done) {
247-
Post.destroyAll(done);
248-
});
234+
before(deleteTestFixtures);
235+
before(createTestFixtures);
249236

250237
it('supports case sensitive queries using like', function(done) {
251238
Post.find({where: {content: {like: '%TestCase%'}}}, function(err, posts) {
@@ -333,6 +320,20 @@ describe('postgresql connector', function() {
333320
done();
334321
});
335322
});
323+
324+
function deleteTestFixtures(done) {
325+
Post.destroyAll(done);
326+
}
327+
328+
function createTestFixtures(done) {
329+
Post.create([{
330+
title: 't1',
331+
content: 'T1_TestCase',
332+
}, {
333+
title: 't2',
334+
content: 'T2_TheOtherCase',
335+
}], done);
336+
}
336337
});
337338

338339
context('regexp operator', function() {

0 commit comments

Comments
 (0)