Skip to content
This repository was archived by the owner on Jan 22, 2018. It is now read-only.

Commit acbf87d

Browse files
author
Kamil Kisiela
committed
test(select): onOpen and onClose
Check bindings
1 parent 8c805d7 commit acbf87d

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/types/select-spec.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ describe("formlyMaterial - select type", () => {
2828
templateOptions: {
2929
label: 'test field',
3030
multiple: true,
31+
onClose: () => true,
32+
onOpen: () => true,
3133
options: [
3234
{name: 'first', nameUp: 'FIRST', value: 'f', valueUp: 'F'},
3335
{name: 'second', nameUp: 'SECOND', value: 's', valueUp: 'S'}
@@ -89,6 +91,16 @@ describe("formlyMaterial - select type", () => {
8991
expect(element.attr('multiple')).toBeDefined();
9092
});
9193

94+
it('should be able to bind md-on-close', () => {
95+
compile();
96+
expect(element.attr('md-on-close')).toBe("options.templateOptions['onClose']");
97+
});
98+
99+
it('should be able to bind md-on-open', () => {
100+
compile();
101+
expect(element.attr('md-on-open')).toBe("options.templateOptions['onOpen']");
102+
});
103+
92104
describe("check options", () => {
93105

94106
afterEach(() => {

0 commit comments

Comments
 (0)