From 9af5a6a77942471f360febc6439923b4899e91e9 Mon Sep 17 00:00:00 2001 From: Fil Maj Date: Thu, 29 Mar 2012 16:13:59 -0700 Subject: [PATCH] updating network test for first-run check of exec --- test/test.network.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/test.network.js b/test/test.network.js index 613f732b..ee9d4c7b 100644 --- a/test/test.network.js +++ b/test/test.network.js @@ -1,11 +1,13 @@ describe("network", function () { var network, - exec = require('cordova/exec'); + exec = require('cordova/exec'), + channel = require('cordova/channel'); - it("should fire exec on first-run", function() { + it("should fire exec on first-run after CordovaReady fires", function() { exec.reset(); network = require('cordova/plugin/network'); + channel.onCordovaReady.fire(); expect(exec).toHaveBeenCalledWith(jasmine.any(Function), jasmine.any(Function), "NetworkStatus", "getConnectionInfo", []); });