Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- describe('Access to DB', function(){
- describe('#fail', function(){
- it('should return -1 because wrong credentials', function(){
- var connection = mysql.createConnection({
- host: 'right host',
- user: 'wrong user',
- password: 'wrong password',
- database: 'right database'
- });
- connection.connect(function(err){
- assert.equal(7,err.stack.indexOf("ER_ACCESS_DENIED_ERROR"));
- });
- });
- })
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement