Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
brainfood
/
rivets
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
bb827d5c
authored
2012-07-18 00:33:59 -0700
by
Michael Richards
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Add specs for the checked and unchecked binding routines.
1 parent
667aee5a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
0 deletions
spec/rivets.js
spec/rivets.js
View file @
bb827d5
...
...
@@ -137,6 +137,38 @@ describe('Rivets', function() {
});
});
});
describe
(
'checked'
,
function
()
{
describe
(
'with a truthy value'
,
function
()
{
it
(
'checks the element'
,
function
()
{
rivets
.
routines
.
checked
(
el
,
true
);
expect
(
el
.
checked
).
toBe
(
true
);
});
});
describe
(
'with a falsey value'
,
function
()
{
it
(
'unchecks the element'
,
function
()
{
rivets
.
routines
.
checked
(
el
,
false
);
expect
(
el
.
checked
).
toBe
(
false
);
});
});
});
describe
(
'unchecked'
,
function
()
{
describe
(
'with a truthy value'
,
function
()
{
it
(
'unchecks the element'
,
function
()
{
rivets
.
routines
.
unchecked
(
el
,
true
);
expect
(
el
.
checked
).
toBe
(
false
);
});
});
describe
(
'with a falsey value'
,
function
()
{
it
(
'checks the element'
,
function
()
{
rivets
.
routines
.
unchecked
(
el
,
false
);
expect
(
el
.
checked
).
toBe
(
true
);
});
});
});
});
describe
(
'Binds'
,
function
()
{
...
...
Please
register
or
sign in
to post a comment