fixup! rename Change.track => rectifyModelChanges
This commit is contained in:
parent
13f67385d0
commit
0bf7af104d
|
@ -88,7 +88,7 @@ Change.setup();
|
|||
* @param {Array} changes Changes that were tracked
|
||||
*/
|
||||
|
||||
Change.track = function(modelName, modelIds, callback) {
|
||||
Change.rectifyModelChanges = function(modelName, modelIds, callback) {
|
||||
var tasks = [];
|
||||
var Change = this;
|
||||
|
||||
|
|
|
@ -551,7 +551,7 @@ Model.enableChangeTracking = function() {
|
|||
var cleanupInterval = Model.settings.changeCleanupInterval || 30000;
|
||||
|
||||
Model.on('changed', function(obj) {
|
||||
Change.track(Model.modelName, [obj.id], function(err) {
|
||||
Change.rectifyModelChanges(Model.modelName, [obj.id], function(err) {
|
||||
if(err) {
|
||||
console.error(Model.modelName + ' Change Tracking Error:');
|
||||
console.error(err);
|
||||
|
@ -560,7 +560,7 @@ Model.enableChangeTracking = function() {
|
|||
});
|
||||
|
||||
Model.on('deleted', function(obj) {
|
||||
Change.track(Model.modelName, [obj.id], function(err) {
|
||||
Change.rectifyModelChanges(Model.modelName, [obj.id], function(err) {
|
||||
if(err) {
|
||||
console.error(Model.modelName + ' Change Tracking Error:');
|
||||
console.error(err);
|
||||
|
|
|
@ -42,11 +42,11 @@ describe('Change', function(){
|
|||
});
|
||||
});
|
||||
|
||||
describe('Change.track(modelName, modelIds, callback)', function () {
|
||||
describe('Change.rectifyModelChanges(modelName, modelIds, callback)', function () {
|
||||
describe('using an existing untracked model', function () {
|
||||
beforeEach(function(done) {
|
||||
var test = this;
|
||||
Change.track(this.modelName, [this.modelId], function(err, trakedChagnes) {
|
||||
Change.rectifyModelChanges(this.modelName, [this.modelId], function(err, trakedChagnes) {
|
||||
if(err) return done(err);
|
||||
test.trakedChagnes = trakedChagnes;
|
||||
done();
|
||||
|
|
Loading…
Reference in New Issue