aboutsummaryrefslogtreecommitdiffstats
path: root/test/scenario/dslSpec.js
diff options
context:
space:
mode:
authorElliott Sprehn2010-11-01 16:51:15 -0700
committerIgor Minar2010-11-02 11:20:41 -0700
commit56a3d52f45ceae7973999ab8351a090f3ffddbba (patch)
treee179c4e12222b3a29be6aadb7944ebeda7a7bb7c /test/scenario/dslSpec.js
parentfaa7d81b679346623c9f023042ddc40dee808e6f (diff)
downloadangular.js-56a3d52f45ceae7973999ab8351a090f3ffddbba.tar.bz2
Make future names consistent and handle falsy values in jQuery generated methods properly
Diffstat (limited to 'test/scenario/dslSpec.js')
-rw-r--r--test/scenario/dslSpec.js18
1 files changed, 15 insertions, 3 deletions
diff --git a/test/scenario/dslSpec.js b/test/scenario/dslSpec.js
index d06c3ec9..9f7bf085 100644
--- a/test/scenario/dslSpec.js
+++ b/test/scenario/dslSpec.js
@@ -278,6 +278,18 @@ describe("angular.scenario.dsl", function() {
expect(doc.find('input').val()).toEqual('baz');
});
+ it('should use correct future name for generated set methods', function() {
+ doc.append('<input value="bar">');
+ $root.dsl.element('input').val(false);
+ expect($root.futures.pop()).toMatch(/element 'input' set val/);
+ });
+
+ it('should use correct future name for generated get methods', function() {
+ doc.append('<input value="bar">');
+ $root.dsl.element('input').val();
+ expect($root.futures.pop()).toMatch(/element 'input' val/);
+ });
+
it('should add all jQuery property methods', function() {
var METHODS = [
'val', 'text', 'html', 'height', 'innerHeight', 'outerHeight', 'width',
@@ -299,7 +311,7 @@ describe("angular.scenario.dsl", function() {
it('should use the selector as label if none is given', function() {
$root.dsl.element('mySelector');
- expect($root.label).toEqual(' mySelector');
+ expect($root.label).toEqual('mySelector');
});
it('should include the selector in paren when a label is given', function() {
@@ -342,7 +354,7 @@ describe("angular.scenario.dsl", function() {
});
it('should use the selector as label if none is given', function() {
- expect($root.label).toEqual(' ul li');
+ expect($root.label).toEqual('ul li');
});
it('should include the selector in paren when a label is given', function() {
@@ -398,7 +410,7 @@ describe("angular.scenario.dsl", function() {
it('should use the selector as label if none is given', function() {
$root.dsl.using('mySelector');
- expect($root.label).toEqual(' mySelector');
+ expect($root.label).toEqual('mySelector');
});
it('should include the selector in paren when a label is given', function() {