Simplify configuration for different environments

This commit is contained in:
Tankred Hase
2016-06-07 14:56:55 +02:00
parent 2ab6333a15
commit 2acbffa2f2
18 changed files with 94 additions and 158 deletions

View File

@@ -22,6 +22,30 @@ describe('Util Unit Tests', () => {
});
});
describe('isTrue', () => {
it('should be true for "true"', () => {
expect(util.isTrue('true')).to.be.true;
});
it('should be true for true', () => {
expect(util.isTrue(true)).to.be.true;
});
it('should be false for "false"', () => {
expect(util.isTrue('false')).to.be.false;
});
it('should be false for false', () => {
expect(util.isTrue(false)).to.be.false;
});
it('should be true for a random string', () => {
expect(util.isTrue('asdf')).to.be.false;
});
it('should be true for undefined', () => {
expect(util.isTrue(undefined)).to.be.false;
});
it('should be true for null', () => {
expect(util.isTrue(null)).to.be.false;
});
});
describe('validateKeyId', () => {
it('should be true for 40 byte hex', () => {
expect(util.validateKeyId('0123456789ABCDEF0123456789ABCDEF01234567')).to.be.true;