This functionality should be moved into `models/badge.js` and tested in `test/badge-model.js`