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
8274ba05
authored
2013-12-03 22:48:47 -0800
by
Michael Richards
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Fix the preloadData spec.
1 parent
f2b6632e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
spec/rivets/binding.js
spec/rivets/binding.js
View file @
8274ba0
...
...
@@ -8,7 +8,7 @@ describe('Rivets.Binding', function() {
el
=
document
.
createElement
(
'div'
);
el
.
setAttribute
(
'data-text'
,
'obj.name'
);
view
=
rivets
.
bind
(
el
,
{
obj
:
{}});
view
=
rivets
.
bind
(
el
,
{
obj
:
{
name
:
'test'
}});
binding
=
view
.
bindings
[
0
];
model
=
binding
.
model
;
});
...
...
@@ -40,12 +40,10 @@ describe('Rivets.Binding', function() {
rivets
.
config
.
preloadData
=
true
;
});
it
(
'sets the initial value
via the adapter
'
,
function
()
{
it
(
'sets the initial value'
,
function
()
{
spyOn
(
binding
,
'set'
);
spyOn
(
adapter
,
'read'
);
binding
.
bind
();
expect
(
adapter
.
read
).
toHaveBeenCalledWith
(
model
,
'name'
);
expect
(
binding
.
set
).
toHaveBeenCalled
();
expect
(
binding
.
set
).
toHaveBeenCalledWith
(
'test'
);
});
});
...
...
Please
register
or
sign in
to post a comment