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

Commit 7dc4f27

Browse files
author
Kamil Kisiela
committed
test(chips): onSelect callback
1 parent 8f2f21e commit 7dc4f27

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

tests/types/chips-spec.js

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ describe("formlyMaterial - chips type", () => {
1919
function onRemove() {
2020
return true;
2121
}
22+
23+
function onSelect() {
24+
return true;
25+
}
2226
//
2327
// helpers
2428
//
@@ -35,7 +39,8 @@ describe("formlyMaterial - chips type", () => {
3539
deleteButtonLabel: "Remove",
3640
deleteHint: "Remove tag",
3741
onAdd: onAdd,
38-
onRemove: onRemove
42+
onRemove: onRemove,
43+
onSelect: onSelect
3944
}
4045
}, options)];
4146

@@ -96,4 +101,11 @@ describe("formlyMaterial - chips type", () => {
96101
expect(scope.options.templateOptions.onRemove).toBe(onRemove);
97102
});
98103

104+
it('should have onSelect callback', () => {
105+
const scope = angular.element(element).scope();
106+
107+
expect(element.attr('md-on-select')).toBe("options.templateOptions['onSelect']");
108+
expect(scope.options.templateOptions.onSelect).toBe(onSelect);
109+
});
110+
99111
});

0 commit comments

Comments
 (0)