source: trunk/t/28_wgs84_coords.t @ 785

Last change on this file since 785 was 785, checked in by Dominic Hargreaves, 15 years ago

Use Wiki::Toolkit. Note that CGI::Wiki::Plugin::Diff hasn't been converted yet,
so tests will be broken for now.

  • Property svn:executable set to *
File size: 853 bytes
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 repository browser.