lib/models/tgi-core-model-session.spec.js
function userStored(model, error) {
          if (typeof error != 'undefined') {
            callback(error);
            return;
          }
          if (user1.get('id') && user2.get('id')) {
            // users added to store now log them both in and also generate 2 errors
            self.goodCount = 0;
            self.badCount = 0;
            session1.startSession(store, name1, 'badpassword', ip1, usersStarted);
            session1.startSession(store, name1, pass1, ip1, usersStarted);
            session2.startSession(store, 'john', pass2, ip2, usersStarted);
            session2.startSession(store, name2, pass2, ip2, usersStarted);
          }
        }
function userStored(model, error) {
          if (typeof error != 'undefined') {
            callback(error);
            return;
          }
          if (user1.get('id') && user2.get('id')) {
            // users added to store now log them both in and also generate 2 errors
            self.goodCount = 0;
            self.badCount = 0;
            session1.startSession(store, name1, 'badpassword', ip1, usersStarted);
            session1.startSession(store, name1, pass1, ip1, usersStarted);
            session2.startSession(store, 'john', pass2, ip2, usersStarted);
            session2.startSession(store, name2, pass2, ip2, usersStarted);
          }
        }
function userStored ( model , error ) { if ( typeof error != 'undefined' ) { callback ( error ) ; return ; } if ( user1 . get ( 'id' ) && user2 . get ( 'id' ) ) { // users added to store now log them both in and also generate 2 errors self . goodCount = 0 ; self . badCount = 0 ; session1 . startSession ( store , name1 , 'badpassword' , ip1 , usersStarted ) ; session1 . startSession ( store , name1 , pass1 , ip1 , usersStarted ) ; session2 . startSession ( store , 'john' , pass2 , ip2 , usersStarted ) ; session2 . startSession ( store , name2 , pass2 , ip2 , usersStarted ) ; } }
callback after users stored
callback after users stored