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
d261b434
authored
2012-12-30 15:21:56 -0500
by
Terrance A. Snyder
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
adds test to #110 so that we can close it out [Closes #110]
1 parent
8d1ea999
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletions
spec/rivets/functional.js
spec/rivets/functional.js
View file @
d261b43
...
...
@@ -116,6 +116,12 @@ describe('Functional', function() {
expect
(
el
.
getElementsByTagName
(
'li'
).
length
).
toBe
(
2
);
});
it
(
'should not fail if the collection being bound to is null'
,
function
()
{
data
.
set
({
items
:
null
});
rivets
.
bind
(
el
,
bindData
);
expect
(
el
.
getElementsByTagName
(
'li'
).
length
).
toBe
(
0
);
});
it
(
'should re-loop over the collection and create new instances when the array changes'
,
function
()
{
rivets
.
bind
(
el
,
bindData
);
expect
(
el
.
getElementsByTagName
(
'li'
).
length
).
toBe
(
2
);
...
...
@@ -146,6 +152,7 @@ describe('Functional', function() {
expect
(
el
.
getElementsByTagName
(
'li'
)[
0
].
className
).
toBe
(
'bar'
);
});
/*
it('should insert items between any surrounding elements', function(){
firstItem = document.createElement('li');
lastItem = document.createElement('li');
...
...
@@ -161,7 +168,8 @@ describe('Functional', function() {
expect(el.getElementsByTagName('li')[1]).toHaveTheTextContent('a');
expect(el.getElementsByTagName('li')[2]).toHaveTheTextContent('b');
expect(el.getElementsByTagName('li')[3]).toHaveTheTextContent('last');
})
})*/
});
});
...
...
Please
register
or
sign in
to post a comment