From c4ef1f2fdd73bdaeda879e596d3d96e4e68cb6fd Mon Sep 17 00:00:00 2001 From: Misko Hevery Date: Thu, 8 Apr 2010 13:43:40 -0700 Subject: tests failing jstd to show cory --- test/BinderTest.js | 155 ++++------------------------------------------------- 1 file changed, 10 insertions(+), 145 deletions(-) (limited to 'test/BinderTest.js') diff --git a/test/BinderTest.js b/test/BinderTest.js index 270fd1c7..e72afa9f 100644 --- a/test/BinderTest.js +++ b/test/BinderTest.js @@ -174,34 +174,6 @@ BinderTest.prototype.testButtonElementActionExecutesInScope = function(){ assertTrue(savedCalled); }; -BinderTest.prototype.XtestParseEmptyAnchor = function(){ - var binder = this.compile("
").binder; - var location = binder.location; - var anchor = binder.anchor; - location.url = "a#x=1"; - binder.parseAnchor(); - assertEquals(1, binder.anchor.x); - location.url = "a#"; - binder.parseAnchor(); - assertTrue("old values did not get removed", !binder.anchor.x); - assertTrue("anchor gor replaced", anchor === binder.anchor); - assertEquals('undefined', typeof (anchor[""])); -}; - -BinderTest.prototype.XtestParseAnchor = function(){ - var binder = this.compile("").binder; - var location = binder.location; - location.url = "a#x=1"; - binder.parseAnchor(); - assertEquals(binder.anchor.x, "1"); - location.url = "a#a=b&c=%20&d"; - binder.parseAnchor(); - assertEquals(binder.anchor.a, 'b'); - assertEquals(binder.anchor.c, ' '); - assertTrue(binder.anchor.d !== null); - assertTrue(!binder.anchor.x); -}; - BinderTest.prototype.testRepeaterUpdateBindings = function(){ var a = this.compile('Hello World!', sortedHtml(c.node)); }; -BinderTest.prototype.XtestDissableAutoSubmit = function() { - var c = this.compile('', null, {autoSubmit:true}); - assertEquals( - '', - sortedHtml(c.node)); - - c = this.compile('', null, {autoSubmit:false}); - assertEquals( - '', - sortedHtml(c.node)); -}; - -BinderTest.prototype.XtestSettingAnchorToNullOrUndefinedRemovesTheAnchorFromURL = function() { - var c = this.compile(''); - c.binder.location.set("http://server/#a=1&b=2"); - c.binder.parseAnchor(); - assertEquals('1', c.binder.anchor.a); - assertEquals('2', c.binder.anchor.b); - - c.binder.anchor.a = null; - c.binder.anchor.b = null; - c.binder.updateAnchor(); - assertEquals('http://server/#', c.binder.location.get()); -}; - BinderTest.prototype.testFillInOptionValueWhenMissing = function() { var c = this.compile( ''); @@ -570,9 +505,11 @@ BinderTest.prototype.testFillInOptionValueWhenMissing = function() { expect(optionC.text()).toEqual('C'); }; -BinderTest.prototype.XtestValidateForm = function() { - var c = this.compile('' + - ''); +BinderTest.prototype.testValidateForm = function() { + var doc = jqLite(document.body); + doc.append('