Asymmetrik/node-rest-starter

View on GitHub
src/app/core/config/config.controller.spec.ts

Summary

Maintainability
A
0 mins
Test Coverage
import * as configController from './config.controller';

describe('Config Server Controller', () => {
    describe('#getSystemConfig', () => {
        it('should not include the mailer configuration', () => {
            const systemConfig = configController.getSystemConfig();
            systemConfig.should.not.have.property('mailer');
        });

        it('should only include a contact email address', () => {
            const systemConfig = configController.getSystemConfig();
            systemConfig.should.have.property('contactEmail');
            systemConfig.contactEmail.should.be.a.String();
        });

        it('should include apiDocs', () => {
            const systemConfig = configController.getSystemConfig();
            systemConfig.should.have.property('apiDocs');
            (systemConfig.apiDocs as any).enabled.should.be.a.Boolean();
        });
    });
});