Skip to content
This repository has been archived by the owner on Jul 13, 2020. It is now read-only.

Commit

Permalink
adding a test and .gitignore file
Browse files Browse the repository at this point in the history
  • Loading branch information
dansnetwork committed Apr 4, 2013
1 parent 4ed2378 commit 20222f7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.DS_Store
9 changes: 8 additions & 1 deletion tests/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,18 @@
ok(instance.elements.ul.find('li[data-inputosaurus="mi_1234"]').size() === 1, 'proper data attr on tag');
});

test('refresh', function(){
test('refresh', 4, function(){
instance.element.val('sprout');
instance.refresh();

ok(instance.elements.ul.children().size() === 3, 'proper number of <li> elements');
ok(instance._chosenValues.length === 1, 'proper value count - one chosen');

instance.element.val('');
instance.refresh();

ok(instance.elements.ul.children().size() === 2, 'proper number of <li> elements');
ok(instance._chosenValues.length === 0, 'proper value count - none chosen');
});

test('parseInput', function(){
Expand Down

0 comments on commit 20222f7

Please sign in to comment.