mirror of
https://github.com/koel/koel
synced 2024-11-24 13:13:05 +00:00
Add another test for ForceHttpsTest
This commit is contained in:
parent
335c3370db
commit
fe9653e09a
1 changed files with 16 additions and 0 deletions
|
@ -46,4 +46,20 @@ class ForceHttpsTest extends TestCase
|
|||
|
||||
$this->assertSame($request, $this->middleware->handle($request, $next));
|
||||
}
|
||||
|
||||
public function testNotHandle(): void
|
||||
{
|
||||
config(['koel.force_https' => false]);
|
||||
|
||||
$this->url->shouldReceive('forceScheme')->with('https')->never();
|
||||
|
||||
$request = Mockery::mock(Request::class);
|
||||
$request->shouldReceive('setTrustedProxies')->never();
|
||||
|
||||
$next = static function (Request $request): Request {
|
||||
return $request;
|
||||
};
|
||||
|
||||
$this->assertSame($request, $this->middleware->handle($request, $next));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue