Remove use of isCustomDomain
Use adminFqdn instead as needed
This commit is contained in:
@@ -132,6 +132,7 @@ describe('Apps', function () {
|
||||
config._reset();
|
||||
|
||||
config.setFqdn(DOMAIN_0.domain);
|
||||
config.setAdminFqdn('my.' + DOMAIN_0.domain);
|
||||
|
||||
async.series([
|
||||
database.initialize,
|
||||
@@ -161,7 +162,7 @@ describe('Apps', function () {
|
||||
|
||||
describe('validateHostname', function () {
|
||||
it('does not allow admin subdomain', function () {
|
||||
expect(apps._validateHostname('my', 'example.com', 'my.example.com')).to.be.an(Error);
|
||||
expect(apps._validateHostname('my', DOMAIN_0.domain, 'my.' + DOMAIN_0.domain)).to.be.an(Error);
|
||||
});
|
||||
|
||||
it('cannot have >63 length subdomains', function () {
|
||||
|
||||
@@ -31,8 +31,8 @@ describe('config', function () {
|
||||
});
|
||||
|
||||
it('did set default values', function () {
|
||||
expect(config.isCustomDomain()).to.equal(true);
|
||||
expect(config.fqdn()).to.equal('');
|
||||
expect(config.adminFqdn()).to.equal('');
|
||||
expect(config.zoneName()).to.equal('');
|
||||
expect(config.adminLocation()).to.equal('my');
|
||||
});
|
||||
@@ -63,20 +63,20 @@ describe('config', function () {
|
||||
|
||||
it('uses dotted locations with custom domain', function () {
|
||||
config.setFqdn('example.com');
|
||||
config.set('isCustomDomain', true);
|
||||
config.setAdminFqdn('my.example.com');
|
||||
|
||||
expect(config.isCustomDomain()).to.equal(true);
|
||||
expect(config.fqdn()).to.equal('example.com');
|
||||
expect(config.adminFqdn()).to.equal('my.example.com');
|
||||
expect(config.adminOrigin()).to.equal('https://my.example.com');
|
||||
expect(config.zoneName()).to.equal('example.com');
|
||||
});
|
||||
|
||||
it('uses hyphen locations with non-custom domain', function () {
|
||||
config.setFqdn('test.example.com');
|
||||
config.set('isCustomDomain', false);
|
||||
config.setAdminFqdn('my-test.example.com');
|
||||
|
||||
expect(config.isCustomDomain()).to.equal(false);
|
||||
expect(config.fqdn()).to.equal('test.example.com');
|
||||
expect(config.adminLocation()).to.equal('my');
|
||||
expect(config.adminOrigin()).to.equal('https://my-test.example.com');
|
||||
expect(config.zoneName()).to.equal('example.com');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user