Skip to content

Commit

Permalink
Fixing tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
ahocevar committed Jul 20, 2012
1 parent 99553d0 commit c786952
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
6 changes: 6 additions & 0 deletions tests/Format/GPX.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@
}
function test_Format_GPX_read(t) {
t.plan(7);

var origDefaultPrecision = OpenLayers.Util.DEFAULT_PRECISION;
OpenLayers.Util.DEFAULT_PRECISION = 9;

var expected,
P = OpenLayers.Geometry.Point,
LS = OpenLayers.Geometry.LineString;
Expand Down Expand Up @@ -61,6 +65,8 @@
new P(-19493.373203291227, 6684644.845706556)
]);
t.geom_eq(features[1].geometry, expected, "transformed route feature correctly created");

OpenLayers.Util.DEFAULT_PRECISION = origDefaultPrecision;
}
function test_format_GPX_read_attributes(t) {
t.plan(2);
Expand Down
6 changes: 3 additions & 3 deletions tests/Layer/Bing.html
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,9 @@
map.zoomToMaxExtent();

t.delay_call(2, function() {
t.ok(layer.attribution.indexOf('olBingAttribution aerial') !== -1, "Attribution has the correct css class");
t.ok(layer.attribution.indexOf('<img src="">') == -1, "Attribution contains a logo");
t.ok(layer.attribution.indexOf('</img></div></a><a style=') == -1 , "Attribution contains a copyright");
t.ok(OpenLayers.Util.indexOf(layer.attribution, 'olBingAttribution aerial') !== -1, "Attribution has the correct css class");
t.ok(OpenLayers.Util.indexOf(layer.attribution, '<img src="">') == -1, "Attribution contains a logo");
t.ok(OpenLayers.Util.indexOf(layer.attribution, '</img></div></a><a style=') == -1 , "Attribution contains a copyright");
map.destroy();
});
}
Expand Down

0 comments on commit c786952

Please sign in to comment.