From aec3c8478c2eb937e24306087c5bc1ef49722036 Mon Sep 17 00:00:00 2001 From: Igor Minar Date: Tue, 2 Nov 2010 16:26:59 -0700 Subject: binding() should return value for input/text area, innerHTML for the rest --- test/scenario/dslSpec.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'test') diff --git a/test/scenario/dslSpec.js b/test/scenario/dslSpec.js index 0338e884..881d629c 100644 --- a/test/scenario/dslSpec.js +++ b/test/scenario/dslSpec.js @@ -376,6 +376,24 @@ describe("angular.scenario.dsl", function() { expect($root.futureResult).toEqual('some value'); }); + it('should return value for input elements', function() { + doc.append(''); + $root.dsl.binding('foo.bar'); + expect($root.futureResult).toEqual('some value'); + }); + + it('should return value for textarea elements', function() { + doc.append(''); + $root.dsl.binding('foo.bar'); + expect($root.futureResult).toEqual('some value'); + }); + + it('should return innerHTML for all the other elements', function() { + doc.append('
some value
'); + $root.dsl.binding('foo.bar'); + expect($root.futureResult).toEqual('some value'); + }); + it('should select binding in template by name', function() { doc.append('
foo some baz
'); $root.dsl.binding('bar'); -- cgit v1.2.3