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

Commit 15d9036

Browse files
author
Kamil Kisiela
committed
test(chips): onRemove callback
1 parent 58e5507 commit 15d9036

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
@@ -15,6 +15,10 @@ describe("formlyMaterial - chips type", () => {
1515
function onAdd() {
1616
return true;
1717
}
18+
19+
function onRemove() {
20+
return true;
21+
}
1822
//
1923
// helpers
2024
//
@@ -30,7 +34,8 @@ describe("formlyMaterial - chips type", () => {
3034
secondaryPlaceholder: "Add tag",
3135
deleteButtonLabel: "Remove",
3236
deleteHint: "Remove tag",
33-
onAdd: onAdd
37+
onAdd: onAdd,
38+
onRemove: onRemove
3439
}
3540
}, options)];
3641

@@ -84,4 +89,11 @@ describe("formlyMaterial - chips type", () => {
8489
expect(scope.options.templateOptions.onAdd).toBe(onAdd);
8590
});
8691

92+
it('should have onRemove callback', () => {
93+
const scope = angular.element(element).scope();
94+
95+
expect(element.attr('md-on-remove')).toBe("options.templateOptions['onRemove']");
96+
expect(scope.options.templateOptions.onRemove).toBe(onRemove);
97+
});
98+
8799
});

0 commit comments

Comments
 (0)