From 5ddbe37ec587e96d60d6c1243cad5678b191d8f4 Mon Sep 17 00:00:00 2001 From: Steven White Date: Mon, 12 Jan 2015 23:31:47 -0500 Subject: [PATCH] Add simple tests --- test/hover-test.js | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 test/hover-test.js diff --git a/test/hover-test.js b/test/hover-test.js new file mode 100644 index 0000000..98b00fd --- /dev/null +++ b/test/hover-test.js @@ -0,0 +1,32 @@ +/** + * hover-test.js + * + * (C) Steven White 2015 + */ + +var should = require('should'), + hover = require('./..'), + h = null; + +describe('on require', function () { + it('should provide a function', function () { + should.exist(hover); + hover.should.be.type('function'); + }); +}); + +describe('on invoke', function () { + it('should provide an object', function () { + h = hover('username', 'password'); + should.exist(h); + h.should.be.type('object'); + }); + + ['getAllDomains', 'getAllDns', 'getDomain', 'getDomainDns', 'createARecord', + 'createMXRecord', 'updateDomainDns', 'removeDns'].forEach(function (method) { + it('should expose ' + method, function () { + should.exist(h[method]); + h[method].should.be.type('function'); + }); + }); +});