You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by sh...@apache.org on 2012/04/27 01:17:58 UTC
spec commit: Added ContactField test - coerce type and value
properties to strings
Updated Branches:
refs/heads/master d6b8a5874 -> 95f734a01
Added ContactField test - coerce type and value properties to strings
Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-mobile-spec/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-mobile-spec/commit/95f734a0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-mobile-spec/tree/95f734a0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-mobile-spec/diff/95f734a0
Branch: refs/heads/master
Commit: 95f734a0193235d0537134397ee7329b9d0245c0
Parents: d6b8a58
Author: shazron <sh...@gmail.com>
Authored: Thu Apr 26 16:17:26 2012 -0700
Committer: shazron <sh...@gmail.com>
Committed: Thu Apr 26 16:17:26 2012 -0700
----------------------------------------------------------------------
autotest/tests/contacts.tests.js | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-cordova-mobile-spec/blob/95f734a0/autotest/tests/contacts.tests.js
----------------------------------------------------------------------
diff --git a/autotest/tests/contacts.tests.js b/autotest/tests/contacts.tests.js
index 959125e..e4344bd 100644
--- a/autotest/tests/contacts.tests.js
+++ b/autotest/tests/contacts.tests.js
@@ -203,6 +203,12 @@ describe("Contacts (navigator.contacts)", function () {
expect(contactField.pref).toBe(true);
});
+ it("ContactField object should coerce type and value properties to strings", function() {
+ var contactField = new ContactField(12345678, 12345678, true);
+ expect(contactField.type).toBe("12345678");
+ expect(contactField.value).toBe("12345678");
+ });
+
it("should be able to define a ContactAddress object", function() {
var contactAddress = new ContactAddress(true, "home", "a","b","c","d","e","f");
expect(contactAddress).toBeDefined();