fixup! rename Change.track => rectifyModelChanges

This commit is contained in:
Ritchie Martori 2014-02-05 15:27:58 -08:00
parent 13f67385d0
commit 0bf7af104d
3 changed files with 5 additions and 5 deletions

View File

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

View File

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

View File

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