Advertisement
Guest User

Untitled

a guest
Jan 26th, 2016
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. describe('Access to DB', function(){
  2. describe('#fail', function(){
  3. it('should return -1 because wrong credentials', function(){
  4. var connection = mysql.createConnection({
  5. host: 'right host',
  6. user: 'wrong user',
  7. password: 'wrong password',
  8. database: 'right database'
  9. });
  10. connection.connect(function(err){
  11. assert.equal(7,err.stack.indexOf("ER_ACCESS_DENIED_ERROR"));
  12. });
  13. });
  14. })
  15. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement