Code coverage report for src/flux/teacher-roster.coffee

Statements: 70.59% (12 / 17)      Branches: 100% (0 / 0)      Functions: 33.33% (1 / 3)      Lines: 70.59% (12 / 17)      Ignored: none     

All files » src/flux/ » teacher-roster.coffee
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41                                     54×                      
var CourseActions, CourseListingActions, CrudConfig, DELETED, DELETING, TeacherRosterConfig, _, actions, extendConfig, makeSimpleStore, ref, ref1, store;
 
ref = require('./helpers'), CrudConfig = ref.CrudConfig, makeSimpleStore = ref.makeSimpleStore, extendConfig = ref.extendConfig;
 
CourseActions = require('./course').CourseActions;
 
CourseListingActions = require('./course-listing').CourseListingActions;
 
_ = require('underscore');
 
DELETING = 'deleting';
 
DELETED = 'deleted';
 
TeacherRosterConfig = {
  "delete": function(teacherId, courseId) {
    this._asyncStatus[teacherId] = DELETING;
    return this.emit(DELETING);
  },
  deleted: function(result, teacherId, courseId) {
    this._asyncStatus[teacherId] = DELETED;
    CourseListingActions["delete"](courseId);
    return this.emit(DELETED);
  },
  exports: {
    isDeleting: function(teacherId) {
      return this._asyncStatus[teacherId] === DELETING;
    }
  }
};
 
extendConfig(TeacherRosterConfig, new CrudConfig());
 
ref1 = makeSimpleStore(TeacherRosterConfig), actions = ref1.actions, store = ref1.store;
 
module.exports = {
  TeacherRosterActions: actions,
  TeacherRosterStore: store
};