Show list of mutiple emails on summary
This commit is contained in:
parent
2b4f4cf8f4
commit
d2683683ae
|
@ -0,0 +1,30 @@
|
|||
import './index.js';
|
||||
|
||||
describe('Salix', () => {
|
||||
describe('Component vnSummary', () => {
|
||||
let controller;
|
||||
|
||||
beforeEach(ngModule('salix'));
|
||||
|
||||
beforeEach(inject($componentController => {
|
||||
const $element = angular.element('<vn-summary></vn-summary>');
|
||||
controller = $componentController('vnSummary', {$element});
|
||||
}));
|
||||
|
||||
describe('listEmails()', () => {
|
||||
it('should do nothing when receives no arguments', () => {
|
||||
const emailList = controller.listEmails();
|
||||
|
||||
expect(emailList).toBeUndefined();
|
||||
});
|
||||
|
||||
it('should format the receives emails to be separated with comma', () => {
|
||||
const expectedResult = 'captainmarvel@marvel.com, ironman@marvel.com';
|
||||
|
||||
const emailList = controller.listEmails('captainmarvel@marvel.com,ironman@marvel.com');
|
||||
|
||||
expect(emailList).toEqual(expectedResult);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
Loading…
Reference in New Issue