Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
converse.js
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
converse.js
Commits
2a7031b5
Commit
2a7031b5
authored
May 14, 2013
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make the spec independently testable
parent
d568d90a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
spec/MainSpec.js
spec/MainSpec.js
+2
-3
No files found.
spec/MainSpec.js
View file @
2a7031b5
...
@@ -343,8 +343,7 @@
...
@@ -343,8 +343,7 @@
describe
(
"
All Contacts
"
,
$
.
proxy
(
function
()
{
describe
(
"
All Contacts
"
,
$
.
proxy
(
function
()
{
it
(
"
are saved to, and can be retrieved from, localStorage
"
,
$
.
proxy
(
function
()
{
it
(
"
are saved to, and can be retrieved from, localStorage
"
,
$
.
proxy
(
function
()
{
var
new_attrs
,
old_attrs
,
attrs
,
old_roster
;
var
new_attrs
,
old_attrs
,
attrs
,
old_roster
;
// One contact was declined, so we have 1 less contact then originally
var
num_contacts
=
this
.
roster
.
length
;
expect
(
this
.
roster
.
length
).
toEqual
(
num_contacts
-
1
);
new_roster
=
new
this
.
RosterItems
();
new_roster
=
new
this
.
RosterItems
();
// Roster items are yet to be fetched from localStorage
// Roster items are yet to be fetched from localStorage
expect
(
new_roster
.
length
).
toEqual
(
0
);
expect
(
new_roster
.
length
).
toEqual
(
0
);
...
@@ -353,7 +352,7 @@
...
@@ -353,7 +352,7 @@
hex_sha1
(
'
converse.rosteritems-dummy@localhost
'
));
hex_sha1
(
'
converse.rosteritems-dummy@localhost
'
));
new_roster
.
fetch
();
new_roster
.
fetch
();
expect
(
this
.
roster
.
length
).
toEqual
(
num_contacts
-
1
);
expect
(
this
.
roster
.
length
).
toEqual
(
num_contacts
);
// Check that the roster items retrieved from localStorage
// Check that the roster items retrieved from localStorage
// have the same attributes values as the original ones.
// have the same attributes values as the original ones.
attrs
=
[
'
jid
'
,
'
fullname
'
,
'
subscription
'
,
'
ask
'
];
attrs
=
[
'
jid
'
,
'
fullname
'
,
'
subscription
'
,
'
ask
'
];
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment