2016-07-06 01:14:44 +00:00
|
|
|
"use strict";
|
|
|
|
require("typings-test");
|
|
|
|
require("should");
|
2016-07-06 04:33:31 +00:00
|
|
|
var smartnginx = require("../dist/index");
|
|
|
|
describe("smartnginx", function () {
|
|
|
|
var testNginxConfig;
|
|
|
|
var testNginxZone01;
|
2016-07-06 06:30:33 +00:00
|
|
|
var testNginxZone02;
|
|
|
|
describe("NginxZone", function () {
|
|
|
|
it("\"new NginxZone()\" should produce an instance of NginxConfig", function () {
|
|
|
|
testNginxZone01 = new smartnginx.NginxZone({
|
|
|
|
zoneName: "test1.bleu.de",
|
|
|
|
type: smartnginx.zoneTypes.reverseProxy,
|
|
|
|
destination: "192.192.192.192"
|
|
|
|
});
|
|
|
|
testNginxZone01.should.be.instanceof(smartnginx.NginxZone);
|
|
|
|
console.log(testNginxZone01.configString);
|
|
|
|
});
|
|
|
|
});
|
2016-07-06 04:33:31 +00:00
|
|
|
describe("NginxConfig", function () {
|
|
|
|
it("\"new NginxConfig()\" should produce an instance of NginxConfig", function () {
|
|
|
|
testNginxConfig = new smartnginx.NginxConfig();
|
|
|
|
testNginxConfig.should.be.instanceof(smartnginx.NginxConfig);
|
|
|
|
});
|
2016-07-08 02:24:07 +00:00
|
|
|
describe(".addZone()", function () {
|
|
|
|
it("should add a zone to NginxConfig Object", function () {
|
|
|
|
testNginxConfig.addZone(testNginxZone01);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
describe(".deploy()", function () {
|
|
|
|
it("should deploy a config from an instance", function () {
|
|
|
|
testNginxConfig.deploy();
|
|
|
|
});
|
|
|
|
});
|
2016-07-06 04:33:31 +00:00
|
|
|
});
|
|
|
|
});
|
2016-07-08 02:24:07 +00:00
|
|
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGVzdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInRlc3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFB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