Lines 130-137
subtest 'validate_secret() tests' => sub {
Link Here
|
130 |
|
130 |
|
131 |
my $secret = $api_key->plain_text_secret; |
131 |
my $secret = $api_key->plain_text_secret; |
132 |
|
132 |
|
133 |
ok( $api_key->validate_secret( $secret ), 'Valid secret returns true' ); |
133 |
is( $api_key->validate_secret( $secret ), 1, 'Valid secret returns true' ); |
134 |
ok( !$api_key->validate_secret( 'Wrong secret' ), 'Invalid secret returns false' ); |
134 |
is( $api_key->validate_secret( 'Wrong secret' ), 0, 'Invalid secret returns false' ); |
135 |
|
135 |
|
136 |
$schema->storage->txn_rollback; |
136 |
$schema->storage->txn_rollback; |
137 |
}; |
137 |
}; |
138 |
- |
|
|