|
Lines 206-212
subtest 'effective_require_strong_password' => sub {
Link Here
|
| 206 |
|
206 |
|
| 207 |
subtest 'get_password_expiry_date() tests' => sub { |
207 |
subtest 'get_password_expiry_date() tests' => sub { |
| 208 |
|
208 |
|
| 209 |
plan tests => 2; |
209 |
plan tests => 3; |
| 210 |
|
210 |
|
| 211 |
$schema->storage->txn_begin; |
211 |
$schema->storage->txn_begin; |
| 212 |
|
212 |
|
|
Lines 218-223
subtest 'get_password_expiry_date() tests' => sub {
Link Here
|
| 218 |
$category->password_expiry_days( 32 )->store; |
218 |
$category->password_expiry_days( 32 )->store; |
| 219 |
is( $category->get_password_expiry_date(), dt_from_string()->add( days => 32 )->ymd, "Date correctly calculated from password_expiry_days when set"); |
219 |
is( $category->get_password_expiry_date(), dt_from_string()->add( days => 32 )->ymd, "Date correctly calculated from password_expiry_days when set"); |
| 220 |
|
220 |
|
|
|
221 |
my $dt = dt_from_string; |
| 222 |
my $original_dt = $dt->clone; |
| 223 |
$category->get_password_expiry_date($dt); |
| 224 |
is( |
| 225 |
$dt->ymd, $original_dt->ymd, |
| 226 |
'DateTime object passed as a parameter should not be modified when ->get_password_expiry_date is called' |
| 227 |
); |
| 228 |
|
| 221 |
}; |
229 |
}; |
| 222 |
|
230 |
|
| 223 |
subtest 'can_make_suggestions' => sub { |
231 |
subtest 'can_make_suggestions' => sub { |
| 224 |
- |
|
|