You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ripple.apache.org by br...@apache.org on 2013/07/08 23:00:32 UTC
[25/28] git commit: There were some failing tests.
There were some failing tests.
This was missed in a recent bug fix commit.
Not a red flag. Just needs a mock/spy change.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ripple/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ripple/commit/6452ff04
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ripple/tree/6452ff04
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ripple/diff/6452ff04
Branch: refs/heads/master
Commit: 6452ff040d2025032db0ac5832aaa868e99d1764
Parents: eac1bc6
Author: Brent Lintner <br...@gmail.com>
Authored: Fri Jul 5 18:21:33 2013 -0400
Committer: Brent Lintner <br...@gmail.com>
Committed: Fri Jul 5 18:21:33 2013 -0400
----------------------------------------------------------------------
test/unit/client/cordova/contacts.js | 26 ++++++++++++--------------
1 file changed, 12 insertions(+), 14 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ripple/blob/6452ff04/test/unit/client/cordova/contacts.js
----------------------------------------------------------------------
diff --git a/test/unit/client/cordova/contacts.js b/test/unit/client/cordova/contacts.js
index 58ed818..5a02464 100644
--- a/test/unit/client/cordova/contacts.js
+++ b/test/unit/client/cordova/contacts.js
@@ -20,6 +20,7 @@
*/
describe("Cordova Contacts Bridge", function () {
var contacts = ripple('platform/cordova/2.0.0/bridge/contacts'),
+ emulatorBridge = ripple('emulatorBridge'),
db = ripple('db'),
contact = {
"name": { formatted: "Mark Dineen" },
@@ -48,25 +49,22 @@ describe("Cordova Contacts Bridge", function () {
}, {
"name": { formatted: "Mark McArdle" },
"displayName": "Mark McArdle",
- "emails": [{ type: "work", value: "mark@tinyhippos.com", pref: false }]
- }],
- navi;
+ "emails": [{ type: "work", value: "mark@tinyhippos.com", pref: false }]
+ }];
beforeEach(function () {
- navi = global.navigator;
s = jasmine.createSpy("success");
e = jasmine.createSpy("error");
- global.navigator = {
- contacts: {
- create: jasmine.createSpy("navigator.contacts.create").andCallFake(function (obj) {
- return obj;
- })
- }
- };
- });
- afterEach(function () {
- global.navigator = navi;
+ spyOn(emulatorBridge, 'window').andReturn({
+ navigator: {
+ contacts: {
+ create: jasmine.createSpy("navigator.contacts.create").andCallFake(function (obj) {
+ return obj;
+ })
+ }
+ }
+ });
});
describe("on search", function () {