From 37dc8daf4923c4004f0dbb95ff5346cad0106b4d Mon Sep 17 00:00:00 2001 From: Rifa Achrinza <25147899+achrinza@users.noreply.github.com> Date: Sun, 12 Sep 2021 23:10:23 +0800 Subject: [PATCH] test: fix EncryptedData tests Signed-off-by: Rifa Achrinza <25147899+achrinza@users.noreply.github.com> --- test/postgresql.encrypted.test.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/test/postgresql.encrypted.test.js b/test/postgresql.encrypted.test.js index 4dd7e5cd..73f27998 100644 --- a/test/postgresql.encrypted.test.js +++ b/test/postgresql.encrypted.test.js @@ -22,7 +22,7 @@ describe('Mapping models', function() { it('should return encrypted data by filter', function(done) { const schema = { - 'name': 'EncryptedData', + 'name': 'EncryptedDataFilter', 'options': { 'idInjection': false, 'postgresql': { @@ -47,26 +47,26 @@ describe('Mapping models', function() { }, }; - const EncryptedData = db.createModel(schema.name, schema.properties, schema.options); - EncryptedData.settings.mixins = schema.mixins; + const EncryptedDataFilter = db.createModel(schema.name, schema.properties, schema.options); + EncryptedDataFilter.settings.mixins = schema.mixins; - db.automigrate('EncryptedData', function(err) { + db.automigrate('EncryptedDataFilter', function(err) { if (err) console.error({err}); - EncryptedData.create({ + EncryptedDataFilter.create({ id: '2', data: '1c93722e6cf53f93dd4eb15a18444dc3e910fded18239db612794059af1fa5e8', }, function(err, encryptedData) { if (err) console.log({err2: err}); async.series([ function(callback) { - EncryptedData.findOne({where: {data: {ilike: '%test%'}}}, function(err, retreivedData) { + EncryptedDataFilter.findOne({where: {data: {ilike: '%test%'}}}, function(err, retreivedData) { if (err) console.error({err111: err}); expect(retreivedData).to.containSubset(encryptedData); callback(null, retreivedData); }); }, function(callback) { - EncryptedData.find({where: {data: {ilike: '%not found%'}}}, function(err, retreivedData) { + EncryptedDataFilter.find({where: {data: {ilike: '%not found%'}}}, function(err, retreivedData) { if (err) console.error({err111: err}); expect(retreivedData.length).to.equal(0); callback(null, retreivedData);