Skip to content

Commit

Permalink
added testing logic for new load function
Browse files Browse the repository at this point in the history
  • Loading branch information
BradBirdsall authored and madrobby committed Oct 26, 2010
1 parent 4dd235c commit 1166d1b
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/ajax.html
Expand Up @@ -13,6 +13,8 @@ <h1>Zepto Ajax unit tests</h1>
See the browser console for results.
</p>

<div id='testAjaxLoad' style="display:none"></div>

<script>
Evidence.TestCase.extend('ZeptoAjaxTest', {

Expand Down Expand Up @@ -42,6 +44,16 @@ <h1>Zepto Ajax unit tests</h1>
});
});
},

testAjaxLoad: function(t) {
var testElem = $('#testAjaxLoad');
t.pause();
testElem.load('testAjaxLoad.html', '#testDiv', function() {
t.resume(function() {
this.assertEqual(testElem.html(), 'Test123');
});
});
},

testAjaxRequestHeader: function(t){
// @see Net Panel/Resources
Expand Down
8 changes: 8 additions & 0 deletions test/testAjaxLoad.html
@@ -0,0 +1,8 @@
<!DOCTYPE html>
<head>
<title>testAjaxLoad</title>
</head>
<body>
<div id='testDiv'>Test123</div>
</body>
</html>

0 comments on commit 1166d1b

Please sign in to comment.