You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by fi...@apache.org on 2012/04/18 23:49:52 UTC
[10/37] spec commit: tweaks to contacts
tweaks to contacts
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/502de686
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-mobile-spec/tree/502de686
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-mobile-spec/diff/502de686
Branch: refs/heads/master
Commit: 502de686eb89d4f0ac2f218409f83e91be7e7bc6
Parents: a4222d3
Author: Fil Maj <ma...@gmail.com>
Authored: Mon Apr 16 14:31:52 2012 -0700
Committer: Fil Maj <ma...@gmail.com>
Committed: Mon Apr 16 16:06:59 2012 -0700
----------------------------------------------------------------------
autotest/tests/contacts.tests.js | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-cordova-mobile-spec/blob/502de686/autotest/tests/contacts.tests.js
----------------------------------------------------------------------
diff --git a/autotest/tests/contacts.tests.js b/autotest/tests/contacts.tests.js
index b653394..c7ccd36 100644
--- a/autotest/tests/contacts.tests.js
+++ b/autotest/tests/contacts.tests.js
@@ -19,7 +19,7 @@ describe("Contacts (navigator.contacts)", function () {
it("should contain a find function", function() {
expect(navigator.contacts.find).toBeDefined();
- expect(typeof navigator.contacts.find == 'function').toBe(true);
+ expect(typeof navigator.contacts.find).toBe('function');
});
it("contacts.find success callback should be called with an array", function() {
@@ -43,7 +43,7 @@ describe("Contacts (navigator.contacts)", function () {
});
});
- it("contacts.find success callback should not be null", function() {
+ it("find success callback should not be null", function() {
var fail = function() {};
var obj = new ContactFindOptions();
var ex;
@@ -55,7 +55,7 @@ describe("Contacts (navigator.contacts)", function () {
}).toThrow();
});
- it("contacts.find error callback should be called when no fields are specified", function() {
+ it("find error callback should be called when no fields are specified", function() {
var win = jasmine.createSpy(),
fail = jasmine.createSpy(function(result) {
expect(typeof result).toBe('object');
@@ -69,10 +69,11 @@ describe("Contacts (navigator.contacts)", function () {
navigator.contacts.find([], win, fail, obj);
});
- waitsFor(function () { return win.wasCalled; }, Tests.TEST_TIMEOUT);
+ waitsFor(function () { return fail.wasCalled; }, Tests.TEST_TIMEOUT);
runs(function () {
expect(win).not.toHaveBeenCalled();
+ expect(fail).toHaveBeenCalled();
});
});