bb827d5c by Michael Richards

Add specs for the checked and unchecked binding routines.

1 parent 667aee5a
...@@ -137,6 +137,38 @@ describe('Rivets', function() { ...@@ -137,6 +137,38 @@ describe('Rivets', function() {
137 }); 137 });
138 }); 138 });
139 }); 139 });
140
141 describe('checked', function() {
142 describe('with a truthy value', function() {
143 it('checks the element', function() {
144 rivets.routines.checked(el, true);
145 expect(el.checked).toBe(true);
146 });
147 });
148
149 describe('with a falsey value', function() {
150 it('unchecks the element', function() {
151 rivets.routines.checked(el, false);
152 expect(el.checked).toBe(false);
153 });
154 });
155 });
156
157 describe('unchecked', function() {
158 describe('with a truthy value', function() {
159 it('unchecks the element', function() {
160 rivets.routines.unchecked(el, true);
161 expect(el.checked).toBe(false);
162 });
163 });
164
165 describe('with a falsey value', function() {
166 it('checks the element', function() {
167 rivets.routines.unchecked(el, false);
168 expect(el.checked).toBe(true);
169 });
170 });
171 });
140 }); 172 });
141 173
142 describe('Binds', function() { 174 describe('Binds', function() {
......