title: How to write unit test for sailsjs controller in mocha
body: <p>I am new with sailsjs, nodejs and mocha unit test. Anyone can give me some guidance in how I can write unit test for the following controller?</p>
  
  <pre><code>getdata : function(req, res) {
      User.findOne(req.id.query).populateAll()
          .exec(function(err, res) {
              if(err) { console.log(err); }
              req.id = res;
              return res.send(req.id);
      });
  },
  </code></pre>
  
  <p>config/route.js</p>
  
  <pre><code>module.exports.routes = {
    'get /list/item':  'manager.getdata',
  }
  </code></pre>