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

Last change on this file since 792 was 792, checked in by nick, 16 years ago

Need to create the sqlite db, having trashed it

  • Property svn:executable set to *
File size: 970 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# And give us a new one
12Wiki::Toolkit::Setup::SQLite::setup( { dbname => "t/node.db" } );
13
14# Now we can start testing
15my $config = OpenGuides::Test->make_basic_config;
16$config->force_wgs84 (1);
17
18my $guide = OpenGuides->new( config => $config );
19
20my ($longitude, $latitude) = (0, 0);
21
22my ($wgs_long, $wgs_lat) = OpenGuides::Utils->get_wgs84_coords(
23                                                    longitude => $longitude,
24                                                    latitude => $latitude,
25                                                    config => $config);
26
27is( $wgs_long, $longitude,
28    "get_wgs84_coords returns the original longitude when force_wgs84 is on");
29is( $wgs_lat, $latitude,
30    "get_wgs84_coords returns the original latitude when force_wgs84 is on");
Note: See TracBrowser for help on using the repository browser.