describe('ConversationSearchView', function() {
it('should match partial numbers', function() {
var $el = $('
');
var view = new Whisper.ConversationSearchView({el: $el, 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);
});
});
});