Created
June 27, 2012 13:03
-
-
Save sebs/3003947 to your computer and use it in GitHub Desktop.
buster document.fail?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
buster.testCase("modSource.getHtmlWithoutScripts", { | |
"setUp": function () { | |
$jt = jQuery.noConflict(); | |
var res = $jt.ajax('simple', {async:false, cache:false}).responseText; | |
document.open('text/html', 'replace'); | |
document.write(res); | |
document.close(); | |
this.doc = document; | |
}, | |
"has function": function () { | |
refute.equals(modSource.getHtmlWithoutScripts, "undefined"); | |
}, | |
"returns a string": function() { | |
assert.equals("string", typeof modSource.getHtmlWithoutScripts(this.doc)); | |
}, | |
"return has no script tag": function() { | |
res = modSource.getHtmlWithoutScripts(this.doc); | |
assert.equals(res.search('script'), -1); | |
assert.equals(res.search('SCRIPT'), -1); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment