Skip to content

Commit 7caf7e4

Browse files
chore(tests): update token tests
1 parent 73909fa commit 7caf7e4

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

tests/VivaWalletTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@
99
)->toBeString();
1010
});
1111

12-
it('can generate webhook verification key', function () {
12+
it('can request webhook verification key', function () {
1313
expect(VivaWallet::requestWebhookKey())->toBeString();
1414
});

tests/VivaWalletTokenTest.php

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
11
<?php
22

3-
use Deyjandi\VivaWallet\Helpers\ClientAuth;
43
use Deyjandi\VivaWallet\VivaWalletToken;
54
use Illuminate\Support\Carbon;
65

7-
it(
8-
'can make auth header',
9-
fn () => expect(ClientAuth::token(VivaWalletToken::getInstance()))->toBeString()
10-
);
6+
it('can issue auth token', function () {
7+
expect(VivaWalletToken::getInstance())->toBeString();
8+
});
119

12-
it('can hit and expire from cache', function () {
10+
it('can hit cache', function () {
1311
$token = VivaWalletToken::getInstance();
1412

1513
expect(cache('viva_wallet_token'))->toEqual($token);
14+
});
15+
16+
it('can expire from cache', function () {
17+
$token = VivaWalletToken::getInstance();
1618

1719
Carbon::setTestNow(now()->addSeconds($token->getExpiresIn()));
1820

0 commit comments

Comments
 (0)