| 1 |
# SPDX-License-Identifier: GPL-2.0-or-later |
| 2 |
|
| 3 |
package Amavis::DKIM::CustomSignerTest; |
| 4 |
|
| 5 |
use Test::Most; |
| 6 |
use base 'Test::Class'; |
| 7 |
|
| 8 |
sub class { 'Amavis::DKIM::CustomSigner' } |
| 9 |
|
| 10 |
sub startup : Tests(startup => 1) { |
| 11 |
my $test = shift; |
| 12 |
use_ok $test->class; |
| 13 |
} |
| 14 |
|
| 15 |
sub constructor : Tests(3) { |
| 16 |
my $test = shift; |
| 17 |
my $class = $test->class; |
| 18 |
can_ok $class, 'new'; |
| 19 |
ok my $lookup = $class->new('scanner', 'module', 'cmd', 'args'), |
| 20 |
'... and the constructor should succeed'; |
| 21 |
isa_ok $lookup, $class, '... and the object it returns'; |
| 22 |
} |
| 23 |
|
| 24 |
1; |