destroy-manager.test.js 715 B

12345678910111213141516171819202122232425262728293031323334
  1. var assert = require('assert');
  2. var Pack = require('../../');
  3. describe('Connectable ::', function() {
  4. describe('Destroy Manager', function() {
  5. var manager;
  6. // Create a manager
  7. before(function(done) {
  8. Pack.createManager({
  9. connectionString: 'mysql://mp:mp@localhost:3306/mppg'
  10. })
  11. .exec(function(err, report) {
  12. if (err) {
  13. return done(err);
  14. }
  15. manager = report.manager;
  16. return done();
  17. });
  18. });
  19. it('should successfully destroy the manager', function(done) {
  20. Pack.destroyManager({
  21. manager: manager
  22. })
  23. .exec(function(err) {
  24. assert(!err);
  25. return done();
  26. });
  27. });
  28. });
  29. });