Changes to easier route registration.
This commit is contained in:
@@ -7,6 +7,7 @@ use Laragear\WebAuthn\Http\Requests\AssertionRequest;
|
||||
use Laragear\WebAuthn\Http\Requests\AttestationRequest;
|
||||
use Laragear\WebAuthn\Http\Requests\AttestedRequest;
|
||||
use Laragear\WebAuthn\JsonTransport;
|
||||
use Laragear\WebAuthn\WebAuthn;
|
||||
use Tests\Stubs\WebAuthnAuthenticatableUser;
|
||||
use Tests\TestCase;
|
||||
|
||||
@@ -14,7 +15,7 @@ class StubControllersTest extends TestCase
|
||||
{
|
||||
protected function defineWebRoutes($router): void
|
||||
{
|
||||
$router->group([], __DIR__ . '/../../../routes/webauthn.php');
|
||||
WebAuthn::routes();
|
||||
}
|
||||
|
||||
public function test_uses_attestation_request(): void
|
||||
|
||||
23
tests/WebAuthnTest.php
Normal file
23
tests/WebAuthnTest.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace Tests;
|
||||
|
||||
use Illuminate\Support\Facades\Route;
|
||||
use Laragear\WebAuthn\WebAuthn;
|
||||
|
||||
class WebAuthnTest extends TestCase
|
||||
{
|
||||
protected function defineWebRoutes($router): void
|
||||
{
|
||||
WebAuthn::routes();
|
||||
}
|
||||
|
||||
public function test_registers_webauthn_routes(): void
|
||||
{
|
||||
static::assertTrue(Route::has('webauthn.register.options'));
|
||||
static::assertTrue(Route::has('webauthn.register'));
|
||||
|
||||
static::assertTrue(Route::has('webauthn.login.options'));
|
||||
static::assertTrue(Route::has('webauthn.login'));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user