Permalink
Browse files

add tests

  • Loading branch information...
1 parent 27318d4 commit 5af9a67e5e1ab89a9eddb78432bf5796bff04c33 @client9 client9 committed Apr 23, 2010
Showing with 7 additions and 1 deletion.
  1. +7 −1 specs/parser/spec.js
View
8 specs/parser/spec.js
@@ -360,7 +360,7 @@ test('Link Loading', function(){
});
test('Form Named Element Lookup', function(){
- expect(8);
+ expect(10);
if ((typeof Envjs == 'undefined') || !Envjs) {
Envjs = {};
}
@@ -387,6 +387,12 @@ test('Form Named Element Lookup', function(){
ok(elements.input1 instanceof HTMLInputElement, 'is HTMLInputElement');
ok(form.input1 instanceof HTMLInputElement, 'is HTMLInputElement');
+ // let's change the name
+ var node = form.input1;
+ node.name = 'input2';
+ ok(elements.input1 instanceof HTMLInputElement, 'is HTMLInputElement');
+ ok(form.input1 instanceof HTMLInputElement, 'is HTMLInputElement');
+
/*
// the other one should be zapped
node2 = doc.foo;

0 comments on commit 5af9a67

Please sign in to comment.