Skip to content

Commit

Permalink
tests
Browse files Browse the repository at this point in the history
  • Loading branch information
HFUBlackRabbit committed Aug 1, 2024
1 parent afefdec commit 06bd778
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions tests/Unit/Models/TelegraphChatTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -838,3 +838,25 @@
'message_thread_id' => 5,
]);
});

it('can accept chat join request', function () {
Telegraph::fake();
$chat = make_chat();

$chat->acceptInvite(123456)->send();

Telegraph::assertSentData(\DefStudio\Telegraph\Telegraph::ENDPOINT_APPROVE_CHAT_JOIN_REQUEST, [
'user_id' => 123456
], false);
});

it('can decline chat join request', function () {
Telegraph::fake();
$chat = make_chat();

$chat->declineInvite(123456)->send();

Telegraph::assertSentData(\DefStudio\Telegraph\Telegraph::ENDPOINT_DECLINE_CHAT_JOIN_REQUEST, [
'user_id' => 123456
], false);
});

0 comments on commit 06bd778

Please sign in to comment.