Skip to content

Commit 582551b

Browse files
test(ProtoViewBuilder): correct duplicate tests
Closes angular#2860
1 parent 19a0349 commit 582551b

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

modules/angular2/test/render/dom/view/proto_view_builder_spec.ts

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,21 +31,20 @@ export function main() {
3131
`Can't bind to 'unknownProperty' since it isn't a know property of the 'div' element and there are no matching directives with a corresponding property`);
3232
});
3333

34-
it('should should allow unknown properties if a directive uses it', () => {
35-
builder.bindElement(el('<div/>')).bindProperty('unknownProperty', emptyExpr());
36-
expect(() => builder.build())
37-
.toThrowError(
38-
`Can't bind to 'unknownProperty' since it isn't a know property of the 'div' element and there are no matching directives with a corresponding property`);
34+
it('should allow unknown properties if a directive uses it', () => {
35+
var binder = builder.bindElement(el('<div/>'));
36+
binder.bindDirective(0).bindProperty('someDirProperty', emptyExpr(), 'directiveProperty');
37+
binder.bindProperty('directiveProperty', emptyExpr());
38+
expect(() => builder.build()).not.toThrow();
3939
});
4040

4141
it('should allow unknown properties on custom elements', () => {
4242
var binder = builder.bindElement(el('<some-custom/>'));
4343
binder.bindProperty('unknownProperty', emptyExpr());
44-
binder.bindDirective(0).bindProperty('someDirProperty', emptyExpr(), 'unknownProperty');
4544
expect(() => builder.build()).not.toThrow();
4645
});
4746

48-
it('should throw for unkown properties on custom elements if there is an ng component', () => {
47+
it('should throw for unknown properties on custom elements if there is an ng component', () => {
4948
var binder = builder.bindElement(el('<some-custom/>'));
5049
binder.bindProperty('unknownProperty', emptyExpr());
5150
binder.setComponentId('someComponent');

0 commit comments

Comments
 (0)