aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorjeresig <jeresig@gmail.com>2010-02-13 14:30:27 -0500
committerjeresig <jeresig@gmail.com>2010-02-13 14:30:27 -0500
commit437ddb931df29c0b46ffb893165e15f159963085 (patch)
tree276b4b8a9c1819342b0b90e150d9db70c7723188 /test
parent053af95294304f6a1e698191de31cb00c922e665 (diff)
downloadjquery-437ddb931df29c0b46ffb893165e15f159963085.tar.gz
jquery-437ddb931df29c0b46ffb893165e15f159963085.zip
No need to run trim on every class iteration in addClass, thanks for the heads-up Leeoniya.
Diffstat (limited to 'test')
-rw-r--r--test/unit/attributes.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/unit/attributes.js b/test/unit/attributes.js
index c5700adda..d7abbad35 100644
--- a/test/unit/attributes.js
+++ b/test/unit/attributes.js
@@ -438,7 +438,7 @@ test("val(Function) with incoming value", function() {
});
var testAddClass = function(valueObj) {
- expect(4);
+ expect(5);
var div = jQuery("div");
div.addClass( valueObj("test") );
var pass = true;
@@ -460,6 +460,10 @@ var testAddClass = function(valueObj) {
div.attr("class", " foo");
div.addClass( valueObj("test") );
equals( div.attr("class"), "foo test", "Make sure there's no extra whitespace." );
+
+ div.attr("class", "foo");
+ div.addClass( valueObj("bar baz") );
+ equals( div.attr("class"), "foo bar baz", "Make sure there isn't too much trimming." );
};
test("addClass(String)", function() {