From 2b6ced06a1749331e03a5661b1b76bf83090275e Mon Sep 17 00:00:00 2001 From: Amir Jafarian Date: Tue, 31 May 2016 11:13:28 -0400 Subject: [PATCH] Add test's description --- test/persistence-hooks.suite.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/persistence-hooks.suite.js b/test/persistence-hooks.suite.js index e8b0333f..87aa2f70 100644 --- a/test/persistence-hooks.suite.js +++ b/test/persistence-hooks.suite.js @@ -1135,6 +1135,9 @@ module.exports = function(dataSource, should, connectorCapabilities) { it('triggers `after save` hook on create', function(done) { TestModel.observe('after save', ctxRecorder.recordAndNext()); + // The rationale behind passing { persisted: true } is to bypass the check + // made by DAO to determine whether the instance should be saved via + // PersistedModel.create and force it to call connector.save() var instance = new TestModel( { id: 'new-id', name: 'created' }, { persisted: true });