Skip to content

Commit f740cb7

Browse files
committed
password tests updated for latest changes
1 parent b307f21 commit f740cb7

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

t/passwords.t

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,38 +19,38 @@ my $release = $class->new;
1919

2020
$release->turn_debug_on;
2121

22-
{
22+
subtest 'cpan_user not set' => sub {
2323
my $output = capture_stderr { $release->check_for_passwords };
2424
is(
2525
$output,
26-
"CPAN pass is \n",
26+
"cpan_user is not set. Not looking for password\n",
2727
"Debug output shows empty password when password unset"
28-
);
29-
}
28+
);
29+
};
3030

31-
{
31+
subtest 'cpan_user not set' => sub {
3232
$ENV{'CPAN_PASS'} = 's3cr3t';
3333
my $output = capture_stderr { $release->check_for_passwords };
3434
is( $release->config->cpan_pass,
3535
undef, "Password is unset when cpan username is not set" );
3636
is(
3737
$output,
38-
"CPAN pass is \n",
38+
"cpan_user is not set. Not looking for password\n",
3939
'Debug output shows unset password when cpan username is not set'
40-
);
41-
}
40+
);
41+
};
4242

43-
{
43+
subtest 'cpan_user not set' => sub {
4444
$ENV{'CPAN_PASS'} = 's3cr3t';
4545
$release->config->set( 'cpan_user', 'BDFOY' );
4646
my $output = capture_stderr { $release->check_for_passwords };
4747
is( $release->config->cpan_pass,
4848
's3cr3t', "Password is set when CPAN_PASS is set" );
4949
is(
5050
$output,
51-
"CPAN pass is s3cr3t\n",
51+
"Used get_env_var to get CPAN_PASS\nCPAN pass is s3cr3t\n",
5252
'Debug output shows password when set'
53-
);
54-
}
53+
);
54+
};
5555

5656
done_testing();

0 commit comments

Comments
 (0)