Add specs for the enabled and disabled binding routines.
Showing
1 changed file
with
32 additions
and
0 deletions
... | @@ -105,6 +105,38 @@ describe('Rivets', function() { | ... | @@ -105,6 +105,38 @@ describe('Rivets', function() { |
105 | }); | 105 | }); |
106 | }); | 106 | }); |
107 | }); | 107 | }); |
108 | |||
109 | describe('enabled', function() { | ||
110 | describe('with a truthy value', function() { | ||
111 | it('enables the element', function() { | ||
112 | rivets.routines.enabled(el, true); | ||
113 | expect(el.disabled).toBe(false); | ||
114 | }); | ||
115 | }); | ||
116 | |||
117 | describe('with a falsey value', function() { | ||
118 | it('disables the element', function() { | ||
119 | rivets.routines.enabled(el, false); | ||
120 | expect(el.disabled).toBe(true); | ||
121 | }); | ||
122 | }); | ||
123 | }); | ||
124 | |||
125 | describe('disabled', function() { | ||
126 | describe('with a truthy value', function() { | ||
127 | it('disables the element', function() { | ||
128 | rivets.routines.disabled(el, true); | ||
129 | expect(el.disabled).toBe(true); | ||
130 | }); | ||
131 | }); | ||
132 | |||
133 | describe('with a falsey value', function() { | ||
134 | it('enables the element', function() { | ||
135 | rivets.routines.disabled(el, false); | ||
136 | expect(el.disabled).toBe(false); | ||
137 | }); | ||
138 | }); | ||
139 | }); | ||
108 | }); | 140 | }); |
109 | 141 | ||
110 | describe('Binds', function() { | 142 | describe('Binds', function() { | ... | ... |
-
Please register or sign in to post a comment