Test cleanup

This commit is contained in:
Fergal Moran
2014-03-20 14:53:22 +00:00
parent 54d1090c40
commit 2fade3342c
5 changed files with 29 additions and 26 deletions

View File

@@ -12,11 +12,10 @@ var PromotionSchema = new Schema({
/* Indexes */
PromotionSchema.index({title: 1, user: 1}, {unique: true});
var _model = mongoose.model('Promotion', PromotionSchema);
/* Operations */
PromotionSchema.statics.findByTitle = function(title, cb){
console.log("findByTitle: " + title);
_model.findOne({title: title}, cb);
this.findOne({title: title}, cb);
};
mongoose.model('Promotion', PromotionSchema);