Created
March 8, 2014 20:43
-
-
Save alexnj/9438579 to your computer and use it in GitHub Desktop.
Unit test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var db = require('../lib/db'); | |
exports = module.exports = {}; | |
exports.findAll = function(req, res) { | |
db.query('select * from users', function(err,rows){ | |
res.send({'users':rows}); | |
}); | |
}; | |
exports.findById = function(req, res, next) { | |
res.send('{"user":{"id":"123","email":"[email protected]"}'); | |
next(); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment