Skip to content

Commit 742a26a

Browse files
committed
test(message-component): Add message model specification
Add message model unit tests
1 parent 8946ba9 commit 742a26a

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import {
2+
beforeEach, beforeEachProviders,
3+
describe, xdescribe,
4+
expect, it, xit,
5+
async, inject
6+
} from '@angular/core/testing';
7+
8+
import { Message } from './message.model';
9+
10+
describe('Model: Message', () => {
11+
it('should construct without Type, Title nor Description', () => {
12+
this.model = new Message();
13+
expect(this.model.type).toBeUndefined();
14+
expect(this.model.title).toBeUndefined();
15+
expect(this.model.description).toBeUndefined();
16+
});
17+
it('should construct with Type, Title and Description', () => {
18+
this.model = new Message('success', 'title', 'description');
19+
expect(this.model.type).toBe('success');
20+
expect(this.model.title).toBe('title');
21+
expect(this.model.description).toBe('description');
22+
});
23+
});

0 commit comments

Comments
 (0)