mirror of
https://gh.wpcy.net/https://github.com/fairpm/aspirecloud.git
synced 2026-06-20 02:22:28 +08:00
16 lines
541 B
PHP
16 lines
541 B
PHP
<?php
|
|
declare(strict_types=1);
|
|
|
|
use App\Http\Controllers\PassThroughController;
|
|
|
|
it('should throw an exception for unexpected pass-through requests', function () {
|
|
$this->get('/events/1.0')->assertServerError();
|
|
});
|
|
|
|
it('should pass through when expecting to be hit', function () {
|
|
Http::fake(); // should already be, but make sure
|
|
PassThroughController::$expectsHit = true;
|
|
$this->get('/events/1.0')->assertOk(); // response is still mocked, so it won't tell us anything more
|
|
});
|
|
|
|
// TODO: write test for real auth token
|