Permalink
Browse files

Fixed some minor issues with the slider tests

Added messages to tests.
Changed test to check exact value of id instead of existence.
Changed var names to better reflect what they are.
  • Loading branch information...
1 parent 8c7d3e9 commit aa4886a24c5080a1bd4036a990443fc49a543123 Jason Scott committed May 25, 2012
Showing with 5 additions and 4 deletions.
  1. +5 −4 tests/unit/slider/slider_core.js
@@ -46,12 +46,13 @@
});
test( "labels that have id keep that id", function() {
- var slider = $("[for=label-id-slider]");
- equal(slider.attr("id"), "label-id");
+ var label = $( "[for=label-id-slider]" );
+ equal(label.attr( "id" ), "label-id", "label id was not changed" );
});
test( "labels without an id get an id", function() {
- var slider = $("[for=empty-string-val-slider]");
- ok(slider.attr("id"));
+ var slider = $( "#empty-string-val-slider" ),
+ label = $( "[for=empty-string-val-slider]" );
+ equal(label.attr( "id" ), slider.attr( "id" ) + "-label", "the label id is based off the slider id" );
});
})( jQuery );

0 comments on commit aa4886a

Please sign in to comment.