File: 01.3-verify-helpers.t

package info (click to toggle)
libpgobject-util-dbadmin-perl 1.6.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 176 kB
  • sloc: perl: 435; makefile: 6; sql: 3
file content (37 lines) | stat: -rw-r--r-- 1,084 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
use warnings;
use strict;

use Test::More;
use PGObject::Util::DBAdmin;

if (not $ENV{AUTHOR_TESTING}) {
    plan skip_all => 'Test only applicable when AUTHOR_TESTING';
}
else {
    plan tests => 3;
}

is_deeply( PGObject::Util::DBAdmin->verify_helpers,
           {
               map { $_ => 1 }
               keys %PGObject::Util::DBAdmin::helper_paths
           },
           'Without arguments, test all helpers');

is_deeply( PGObject::Util::DBAdmin->verify_helpers(
               operations => [ keys %PGObject::Util::DBAdmin::helpers ]
           ),
           {
               map { $_ => 1 }
               keys %PGObject::Util::DBAdmin::helper_paths
           },
           'With the "operations" argument, test the associated helpers');

is_deeply( PGObject::Util::DBAdmin->verify_helpers(
               helpers => [ keys %PGObject::Util::DBAdmin::helper_paths ]
           ),
           {
               map { $_ => 1 }
               keys %PGObject::Util::DBAdmin::helper_paths
           },
           'With the "helpers" argument, test the associated helpers');