mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-13 06:32:39 +00:00
Fixing edge cases in the search tests
This commit is contained in:
@@ -56,6 +56,7 @@ module.exports = {
|
||||
},
|
||||
|
||||
populateDB : (brewCollection)=>{
|
||||
PopulatedBrews = {};
|
||||
return Promise.all(_.map(brewCollection, (brewData, id) => {
|
||||
return BrewData.create(brewData)
|
||||
.then((brew)=>{
|
||||
@@ -72,8 +73,7 @@ module.exports = {
|
||||
const storedBrew = PopulatedBrews[brewId];
|
||||
if(!storedBrew) return false;
|
||||
return _.some(this._obj, (brew)=>{
|
||||
return brew.editId == storedBrew.editId &&
|
||||
brew.shareId == storedBrew.shareId &&
|
||||
return brew.shareId == storedBrew.shareId &&
|
||||
brew.title == storedBrew.title &&
|
||||
brew.views == storedBrew.views;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user