mozilla-b2g/gaia — pull request #8526 by rwldrn (2013-03-07 21:56:48+00:00)
Title: Bug 840073 - [MMS][User Story] Address recipient by phone number or Contact name

https://bugzilla.mozilla.org/show_bug.cgi?id=840073
https://bugzilla.mozilla.org/show_bug.cgi?id=846844

Continues the work originally here: https://github.com/rwldrn/gaia/commits/840073

Simplifies Contact filtering with reasonable defaults for the most common lookups. Adds tests to support the updated and new behaviours.

Tested with:
- automatted test-agent (pass existing and new)
- gjslint (passing)
- manually on unagi device (behaviour/UX confirmed)

```bash
[sms] Contacts
[sms] Mock
✓ [sms] (mock)
[sms] Contacts.filterBy
✓ [sms] (string[tel,givenName,familyName], callback)
✓ [sms] (string[tel], callback)
✓ [sms] (object, callback), 1
✓ [sms] (object, callback), 2
```

```bash
$ gjslint apps/sms/js/contacts.js
1 files checked, no errors found.

$ gjslint apps/sms/test/unit/contactdata_test.js
1 files checked, no errors found.
```