Create contact from number with common punctuation
The 'Create new contact' option should now appear for numbers including parens and other common punctuation. // FREEBIEpull/749/head
parent
ae52c047bf
commit
3d98b54027
@ -0,0 +1,24 @@
|
||||
describe('ConversationSearchView', function() {
|
||||
it('should match partial numbers', function() {
|
||||
var $el = $('<div><div class="new-contact contact hide"></div></div>');
|
||||
var view = new Whisper.ConversationSearchView({el: $el, input: $('<input>')}).render();
|
||||
var maybe_numbers = [
|
||||
"+1 415",
|
||||
"+1415",
|
||||
"+1415",
|
||||
"415",
|
||||
"(415)",
|
||||
" (415",
|
||||
"(415) 123 4567",
|
||||
"+1 (415) 123 4567",
|
||||
" +1 (415) 123 4567",
|
||||
"1 (415) 123 4567",
|
||||
"1 415-123-4567",
|
||||
"415-123-4567"
|
||||
];
|
||||
maybe_numbers.forEach(function(n) {
|
||||
assert.ok(view.maybeNumber(n), n);
|
||||
});
|
||||
});
|
||||
|
||||
});
|
Loading…
Reference in New Issue