Skip to content
Snippets Groups Projects
Commit a9fd781a authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

Initial module test (new/isa/can)

parent a30be50b
No related branches found
No related tags found
No related merge requests found
......@@ -104,7 +104,7 @@ if ($efa->{'error'}) {
die $efa->{'error'}->as_string();
}
if (ref($efa) eq 'WWW::Efa::Error') {
if ($efa->isa('WWW::Efa::Error')) {
die($efa->as_string);
}
......
#!/usr/bin/env perl
use strict;
use warnings;
use 5.010;
use Test::More tests => 6;
BEGIN {
use_ok('WWW::Efa');
}
require_ok('WWW::Efa');
my $conf_default = {
from => ['Essen', 'HBf'],
to => ['Koeln', 'HBf'],
};
my $post_default = {
place_origin => 'Essen',
name_origin => 'HBf',
type_origin => 'stop',
place_destination => 'Koeln',
name_destination => 'HBf',
type_destination => 'stop',
};
my $efa = new_ok('WWW::Efa' => [%{$conf_default}]);
can_ok($efa, qw{new submit parse connections});
is_deeply($efa->{'config'}, $conf_default);
is_deeply($efa->{'post'}, $post_default);
$efa = WWW::Efa->new();
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment