diff options
-rw-r--r-- | t/04-Shared_TimeZone.t | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/t/04-Shared_TimeZone.t b/t/04-Shared_TimeZone.t new file mode 100644 index 00000000..d0d08d2c --- /dev/null +++ b/t/04-Shared_TimeZone.t @@ -0,0 +1,20 @@ +#!perl -T +use 5.006; +use strict; +use warnings FATAL => 'all'; +use Test::More; + +BEGIN { + use_ok( 'AdminPanel::Shared::TimeZone' ) || print "AdminPanel::Shared::TimeZone failed!\n"; +} + + ok( my $tz = AdminPanel::Shared::TimeZone->new(), 'create'); + is( $tz->get_timezone_prefix(), '/usr/share/zoneinfo', 'get_timezone_prefix' ); + ok (my @l = $tz->getTimeZones(), 'getTimeZones'); + ok (my $h = $tz->readConfiguration(), 'readConfiguration'); + ok (my $s = $tz->ntpCurrentServer(), 'currentNTPServer'); + diag "ntpCurrentServer got: < " . ($s ? $s : "none") . " >"; + ok (my $a = ($tz->isNTPRunning() ? "not running" : "running"), 'isNTPRunning'); + diag "isNTPRunning got: < " . $a . " >"; + +done_testing; |