85eb25be by Michael Richards

Add specs for the selected and unselected binding routines.

1 parent bb827d5c
......@@ -169,6 +169,38 @@ describe('Rivets', function() {
});
});
});
describe('selected', function() {
describe('with a truthy value', function() {
it('selects the element', function() {
rivets.routines.selected(el, true);
expect(el.selected).toBe(true);
});
});
describe('with a falsey value', function() {
it('unselects the element', function() {
rivets.routines.selected(el, false);
expect(el.selected).toBe(false);
});
});
});
describe('unselected', function() {
describe('with a truthy value', function() {
it('unselects the element', function() {
rivets.routines.unselected(el, true);
expect(el.selected).toBe(false);
});
});
describe('with a falsey value', function() {
it('selects the element', function() {
rivets.routines.unselected(el, false);
expect(el.selected).toBe(true);
});
});
});
});
describe('Binds', function() {
......