Add config.setFqdn and config.setZoneName

Part of #110
This commit is contained in:
Girish Ramakrishnan
2017-06-08 19:22:58 -07:00
parent 4781c4e364
commit ded31b977e
10 changed files with 59 additions and 33 deletions

View File

@@ -41,7 +41,7 @@ describe('config', function () {
expect(config.fqdn()).to.equal('localhost');
expect(config.adminOrigin()).to.equal('https://' + constants.ADMIN_LOCATION + '.localhost');
expect(config.appFqdn('app')).to.equal('app.localhost');
expect(config.zoneName()).to.equal('localhost');
expect(config.zoneName()).to.equal('');
});
it('set saves value in file', function (done) {
@@ -63,7 +63,7 @@ describe('config', function () {
});
it('uses dotted locations with custom domain', function () {
config.set('fqdn', 'example.com');
config.setFqdn('example.com');
config.set('isCustomDomain', true);
expect(config.isCustomDomain()).to.equal(true);
@@ -74,7 +74,7 @@ describe('config', function () {
});
it('uses hyphen locations with non-custom domain', function () {
config.set('fqdn', 'test.example.com');
config.setFqdn('test.example.com');
config.set('isCustomDomain', false);
expect(config.isCustomDomain()).to.equal(false);
@@ -95,4 +95,3 @@ describe('config', function () {
});
});