mirror of
https://github.com/fergalmoran/roboto-promoto.git
synced 2025-12-22 01:30:36 +00:00
Test cleanup
This commit is contained in:
8
lib/config/env/test.js
vendored
8
lib/config/env/test.js
vendored
@@ -1,8 +1,8 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = {
|
||||
env: 'test',
|
||||
mongo: {
|
||||
uri: 'mongodb://localhost/roboto-test'
|
||||
}
|
||||
env: 'test',
|
||||
mongo: {
|
||||
uri: 'mongodb://localhost/roboto-test'
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user