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

Commit 18c819f

Browse files
author
Kamil Kisiela
committed
test(input): templateOptions.disabled
1 parent 7ee864a commit 18c819f

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/types/input-spec.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ describe('formlyMaterial - input type', () => {
2323
key: 'testField',
2424
type: 'input',
2525
templateOptions: {
26+
disabled: true,
2627
type: 'email',
2728
label: 'test field'
2829
}
@@ -76,6 +77,13 @@ describe('formlyMaterial - input type', () => {
7677
});
7778
});
7879

80+
it('should be disabled', () => {
81+
const scope = element.scope();
82+
83+
expect(element.attr('ng-disabled')).toBe(`options.templateOptions['disabled']`);
84+
expect(scope.options.templateOptions.disabled).toBe(true);
85+
});
86+
7987
describe('pattern', () => {
8088
it('should accept string', () => {
8189
const pattern = '[a-z]+';

0 commit comments

Comments
 (0)