root/branches/move-to-wiki-toolkit/t/28_wgs84_coords.t

Revision 763, 0.8 kB (checked in by dom, 3 years ago)

Simple search and replace, should cover most things.

  • Property svn:executable set to *
Line 
1use strict;
2use Wiki::Toolkit::Setup::SQLite;
3use OpenGuides;
4use OpenGuides::Test;
5use Test::More;
6
7plan tests => 2;
8
9# Clear out the database from any previous runs.
10unlink "t/node.db";
11
12my $config = OpenGuides::Test->make_basic_config;
13$config->force_wgs84 (1);
14
15my $guide = OpenGuides->new( config => $config );
16
17my ($longitude, $latitude) = (0, 0);
18
19my ($wgs_long, $wgs_lat) = OpenGuides::Utils->get_wgs84_coords(
20                                                    longitude => $longitude,
21                                                    latitude => $latitude,
22                                                    config => $config);
23
24is( $wgs_long, $longitude,
25    "get_wgs84_coords returns the original longitude when force_wgs84 is on");
26is( $wgs_lat, $latitude,
27    "get_wgs84_coords returns the original latitude when force_wgs84 is on");
Note: See TracBrowser for help on using the browser.