lib/core/tgi-core-store.spec.js
function stoogeStored(model, error) {
        if (typeof error != 'undefined') {
          callback(error);
          return;
        }
        try {
          self.stoogeIDsStored.push(model.get('id'));
          //console.log('Now we have moe ' + self.moe.get('id'));
          //console.log('model says ' + model.get('id'));
          if (self.stoogeIDsStored.length == 3) {
            // Now that first 3 stooges are stored lets retrieve and verify
            var actors = [];
            for (var i = 0; i < 3; i++) {
              actors.push(new self.Stooge());
              actors[i].set('id', self.stoogeIDsStored[i]);
              spec.integrationStore.getModel(actors[i], stoogeRetrieved);
            }
          }
        }
        catch (err) {
          callback(err);
        }
      }
function stoogeStored(model, error) {
        if (typeof error != 'undefined') {
          callback(error);
          return;
        }
        try {
          self.stoogeIDsStored.push(model.get('id'));
          //console.log('Now we have moe ' + self.moe.get('id'));
          //console.log('model says ' + model.get('id'));
          if (self.stoogeIDsStored.length == 3) {
            // Now that first 3 stooges are stored lets retrieve and verify
            var actors = [];
            for (var i = 0; i < 3; i++) {
              actors.push(new self.Stooge());
              actors[i].set('id', self.stoogeIDsStored[i]);
              spec.integrationStore.getModel(actors[i], stoogeRetrieved);
            }
          }
        }
        catch (err) {
          callback(err);
        }
      }
function stoogeStored ( model , error ) { if ( typeof error != 'undefined' ) { callback ( error ) ; return ; } try { self . stoogeIDsStored . push ( model . get ( 'id' ) ) ; //console.log('Now we have moe ' + self.moe.get('id')); //console.log('model says ' + model.get('id')); if ( self . stoogeIDsStored . length == 3 ) { // Now that first 3 stooges are stored lets retrieve and verify var actors = [ ] ; for ( var i = 0 ; i < 3 ; i ++ ) { actors . push ( new self . Stooge ( ) ) ; actors [ i ] . set ( 'id' , self . stoogeIDsStored [ i ] ) ; spec . integrationStore . getModel ( actors [ i ] , stoogeRetrieved ) ; } } } catch ( err ) { callback ( err ) ; } }
callback after storing stooges
callback after storing stooges