bega updates

This commit is contained in:
Mekan1206
2026-07-21 21:30:27 +05:00
parent 6093a45761
commit db94922e9a
22 changed files with 1033 additions and 26 deletions

View File

@@ -0,0 +1,21 @@
<?php
use App\Rules\VerificationRule;
it('normalizes the bypass phone number from international format', function () {
expect(normalizeTurkmenPhoneNumber('+99365222548'))->toBe('65222548');
});
it('allows the approved otp bypass code for the approved phone number', function () {
$failed = false;
(new VerificationRule('+99365222548'))->validate('code', 12212, function () use (&$failed) {
$failed = true;
});
expect($failed)->toBeFalse();
});
it('does not allow the otp bypass code for other phone numbers', function () {
expect(isOtpBypass('+99365222549', 12212))->toBeFalse();
});