Permalink
Browse files

Test to check types loaded from DOM

  • Loading branch information...
lilspikey committed Sep 22, 2011
1 parent 24003f7 commit 253b001ac204538edb9d43f09505fef6d5a8b9e4
Showing with 6 additions and 0 deletions.
  1. +6 −0 tests/moot-tests.js
View
@@ -135,6 +135,12 @@ test("animation backed by span inside sprite div", function() {
var sprite_elem = sprite.elem();
equals(sprite_elem.find('span.animation-class').get(0), animation_elem.get(0), 'sprite div contains animation span');
});
+test("sprite types loaded from DOM", function() {
+ var world_elem = $('<div>');
+ var world = Moot.world(world_elem);
+ var sprite = world.create_sprite($('<div id="main-sprite" class="my-type"></div>'));
+ ok('my-type' in sprite.types(), "sprite has type from DOM");
+});
module("Animation")
test("frame updates class", function() {

0 comments on commit 253b001

Please sign in to comment.