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
85eb25be
authored
2012-07-18 00:37:02 -0700
by
Michael Richards
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Add specs for the selected and unselected binding routines.
1 parent
bb827d5c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
0 deletions
spec/rivets.js
spec/rivets.js
View file @
85eb25b
...
...
@@ -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
()
{
...
...
Please
register
or
sign in
to post a comment