Merge pull request #950 from strongloop/add_test_description

Add test's description
This commit is contained in:
Miroslav Bajtoš 2016-06-01 09:57:53 +02:00
commit 6ec66a7e4a
1 changed files with 3 additions and 0 deletions

View File

@ -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 });