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