import { Injectable } from '@angular/core'; import { GCMockModule } from '@core/mocks/gc-module.mock'; import { Spec, TestCase } from '@yourcause/test-decorators'; import { DescribeAngularService } from '@yourcause/test-decorators/angular'; import { expect } from 'chai'; import { EmailService } from './email.service'; import { EmailNotificationType } from './email.typing'; @Injectable({ providedIn: 'root' }) @DescribeAngularService(EmailService, { imports: [GCMockModule] }) export class EmailServiceSpec implements Spec { @TestCase('should exist') testShouldExist (service: EmailService) { expect(service).to.exist; } @TestCase('should be able to getShowCheckboxForCcEdit') getShowCheckboxForCcEdit (service: EmailService) { let shouldShow = service.getShowCheckboxForCcEdit( EmailNotificationType.RequestRevision ); expect(shouldShow).to.be.true; shouldShow = service.getShowCheckboxForCcEdit( EmailNotificationType.VettingApprovedApplicant ); expect(shouldShow).to.be.false; } }