From 582551bea93266dcba852b276dcf3539cfdcf20e Mon Sep 17 00:00:00 2001 From: Pawel Kozlowski Date: Fri, 3 Jul 2015 14:01:49 +0200 Subject: [PATCH] test(ProtoViewBuilder): correct duplicate tests Closes #2860 --- .../test/render/dom/view/proto_view_builder_spec.ts | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/modules/angular2/test/render/dom/view/proto_view_builder_spec.ts b/modules/angular2/test/render/dom/view/proto_view_builder_spec.ts index 81b3596567..d21d6f2599 100644 --- a/modules/angular2/test/render/dom/view/proto_view_builder_spec.ts +++ b/modules/angular2/test/render/dom/view/proto_view_builder_spec.ts @@ -31,21 +31,20 @@ export function main() { `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`); }); - it('should should allow unknown properties if a directive uses it', () => { - builder.bindElement(el('
')).bindProperty('unknownProperty', emptyExpr()); - expect(() => builder.build()) - .toThrowError( - `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`); + it('should allow unknown properties if a directive uses it', () => { + var binder = builder.bindElement(el('
')); + binder.bindDirective(0).bindProperty('someDirProperty', emptyExpr(), 'directiveProperty'); + binder.bindProperty('directiveProperty', emptyExpr()); + expect(() => builder.build()).not.toThrow(); }); it('should allow unknown properties on custom elements', () => { var binder = builder.bindElement(el('')); binder.bindProperty('unknownProperty', emptyExpr()); - binder.bindDirective(0).bindProperty('someDirProperty', emptyExpr(), 'unknownProperty'); expect(() => builder.build()).not.toThrow(); }); - it('should throw for unkown properties on custom elements if there is an ng component', () => { + it('should throw for unknown properties on custom elements if there is an ng component', () => { var binder = builder.bindElement(el('')); binder.bindProperty('unknownProperty', emptyExpr()); binder.setComponentId('someComponent');