Introduce intl-friendly sort order for contact lists (#1900)
This commit is contained in:
parent
5cf320e429
commit
f0aaa7a1c5
5 changed files with 78 additions and 16 deletions
|
@ -98,6 +98,23 @@
|
|||
});
|
||||
after(clearDatabase);
|
||||
|
||||
it('sorts its contacts in an intl-friendly way', function() {
|
||||
var convo = new Whisper.Conversation({id: '+18085555555'});
|
||||
convo.contactCollection.add(new Whisper.Conversation({
|
||||
name: 'C'
|
||||
}));
|
||||
convo.contactCollection.add(new Whisper.Conversation({
|
||||
name: 'B'
|
||||
}));
|
||||
convo.contactCollection.add(new Whisper.Conversation({
|
||||
name: 'Á'
|
||||
}));
|
||||
|
||||
assert.strictEqual(convo.contactCollection.at('0').get('name'), 'Á');
|
||||
assert.strictEqual(convo.contactCollection.at('1').get('name'), 'B');
|
||||
assert.strictEqual(convo.contactCollection.at('2').get('name'), 'C');
|
||||
});
|
||||
|
||||
it('contains its own messages', function (done) {
|
||||
var convo = new Whisper.ConversationCollection().add({id: '+18085555555'});
|
||||
convo.fetchMessages().then(function() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue