incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From purplecabb...@apache.org
Subject [1/9] spec commit: [CB-1581, CB-1582] invalid tests
Date Thu, 04 Oct 2012 01:48:35 GMT
Updated Branches:
  refs/heads/master be7f2754d -> f47c2eee3


[CB-1581, CB-1582] invalid tests


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/f47c2eee
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-mobile-spec/tree/f47c2eee
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-mobile-spec/diff/f47c2eee

Branch: refs/heads/master
Commit: f47c2eee3f7d8872f82e27d1f25acd5767f116f3
Parents: da2213c
Author: Jesse MacFadyen <purplecabbage@gmail.com>
Authored: Wed Oct 3 18:47:25 2012 -0700
Committer: Jesse MacFadyen <purplecabbage@gmail.com>
Committed: Wed Oct 3 18:47:25 2012 -0700

----------------------------------------------------------------------
 autotest/tests/geolocation.tests.js |   25 +------------------------
 1 files changed, 1 insertions(+), 24 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-mobile-spec/blob/f47c2eee/autotest/tests/geolocation.tests.js
----------------------------------------------------------------------
diff --git a/autotest/tests/geolocation.tests.js b/autotest/tests/geolocation.tests.js
index 08a0362..0d65961 100644
--- a/autotest/tests/geolocation.tests.js
+++ b/autotest/tests/geolocation.tests.js
@@ -66,7 +66,6 @@ describe('Geolocation (navigator.geolocation)', function () {
                 var win = jasmine.createSpy().andCallFake(function(p) {
                           expect(p.coords).toBeDefined();
                           expect(p.timestamp).toBeDefined();
-                          expect(p.timestamp instanceof Date).toBe(true);
                       }),
                       fail = jasmine.createSpy();
 
@@ -121,13 +120,12 @@ describe('Geolocation (navigator.geolocation)', function () {
                 var win = jasmine.createSpy().andCallFake(function(p) {
                           expect(p.coords).toBeDefined();
                           expect(p.timestamp).toBeDefined();
-                          expect(p.timestamp instanceof Date).toBe(true);
                       }),
                       fail = jasmine.createSpy();
 
                 runs(function () {
                     successWatch = navigator.geolocation.watchPosition(win, fail, {
-                        maximumAge:300000 // 5 minutes maximum age of cached position
+                        maximumAge:(5 * 60 * 1000) // 5 minutes maximum age of cached position
                     });
                 });
 
@@ -139,25 +137,4 @@ describe('Geolocation (navigator.geolocation)', function () {
             });
         });
     });
-
-    describe("Geolocation model", function () {
-        it("should be able to define a Position object with coords and timestamp properties",
function() {
-            var pos = new Position({}, new Date());
-            expect(pos).toBeDefined();
-            expect(pos.coords).toBeDefined();
-            expect(pos.timestamp).toBeDefined();
-        });
-
-        it("should be able to define a Coordinates object with latitude, longitude, accuracy,
altitude, heading, speed and altitudeAccuracy properties", function() {
-            var coords = new Coordinates(1,2,3,4,5,6,7);
-            expect(coords).toBeDefined();
-            expect(coords.latitude).toBeDefined();
-            expect(coords.longitude).toBeDefined();
-            expect(coords.accuracy).toBeDefined();
-            expect(coords.altitude).toBeDefined();
-            expect(coords.heading).toBeDefined();
-            expect(coords.speed).toBeDefined();
-            expect(coords.altitudeAccuracy).toBeDefined();
-        });
-    });
 });


Mime
View raw message