createInstance triggers Map "created" event
Calling createInstance
will now trigger the created
event on any connected Map
constructor.
var Session = DefineMap.extend({
id: 'any',
email: 'string'
});
var connection = connect([
constructor,
canMap,
constructorStore,
dataCallbacks,
realTime,
callbacksOnce
], {
Map: Session
});
Session.on('created', function (event) {
assert.ok(event, 'createInstance triggered the "created" event');
done();
});
connection.createInstance({
id: 5,
email: 'marshall@bitovi.com'
});
PR: #225