diff options
Diffstat (limited to 't/00-load.t')
| -rw-r--r-- | t/00-load.t | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/t/00-load.t b/t/00-load.t new file mode 100644 index 0000000..73c8063 --- /dev/null +++ b/t/00-load.t @@ -0,0 +1,42 @@ +use strict; +use warnings; + +use Test::More; + +my @modules = qw( + Cepis + Cepis::Address + Cepis::CSV + Cepis::Client + Cepis::Error + Cepis::Geo + Cepis::Health +); + +use_ok($_) for @modules; + +is( $Cepis::VERSION, '0.1.0', 'Cepis is at version 0.1.0' ); + +for my $module (@modules) { + no strict 'refs'; + is( ${"${module}::VERSION"}, $Cepis::VERSION, "$module carries the same version" ); +} + +for my $class ( + qw( + Cepis::Error::InvalidCEP + Cepis::Error::CEPNotFound + Cepis::Error::Network + Cepis::Error::ServerError + Cepis::Error::RateLimited + Cepis::Error::InvalidResponse + ) + ) +{ + ok( $class->isa('Cepis::Error'), "$class is a Cepis::Error" ); +} + +can_ok( 'Cepis', qw(lookup lookup_many health normalize_cep default_client) ); +can_ok( 'Cepis::Client', qw(new lookup lookup_many health) ); + +done_testing(); |