@@ -19,38 +19,38 @@ my $release = $class->new;
19
19
20
20
$release -> turn_debug_on;
21
21
22
- {
22
+ subtest ' cpan_user not set ' => sub {
23
23
my $output = capture_stderr { $release -> check_for_passwords };
24
24
is(
25
25
$output ,
26
- " CPAN pass is \n " ,
26
+ " cpan_user is not set. Not looking for password \n " ,
27
27
" Debug output shows empty password when password unset"
28
- );
29
- }
28
+ );
29
+ };
30
30
31
- {
31
+ subtest ' cpan_user not set ' => sub {
32
32
$ENV {' CPAN_PASS' } = ' s3cr3t' ;
33
33
my $output = capture_stderr { $release -> check_for_passwords };
34
34
is( $release -> config-> cpan_pass,
35
35
undef , " Password is unset when cpan username is not set" );
36
36
is(
37
37
$output ,
38
- " CPAN pass is \n " ,
38
+ " cpan_user is not set. Not looking for password \n " ,
39
39
' Debug output shows unset password when cpan username is not set'
40
- );
41
- }
40
+ );
41
+ };
42
42
43
- {
43
+ subtest ' cpan_user not set ' => sub {
44
44
$ENV {' CPAN_PASS' } = ' s3cr3t' ;
45
45
$release -> config-> set( ' cpan_user' , ' BDFOY' );
46
46
my $output = capture_stderr { $release -> check_for_passwords };
47
47
is( $release -> config-> cpan_pass,
48
48
' s3cr3t' , " Password is set when CPAN_PASS is set" );
49
49
is(
50
50
$output ,
51
- " CPAN pass is s3cr3t\n " ,
51
+ " Used get_env_var to get CPAN_PASS \n CPAN pass is s3cr3t\n " ,
52
52
' Debug output shows password when set'
53
- );
54
- }
53
+ );
54
+ };
55
55
56
56
done_testing();
0 commit comments