Skip to content

Commit

Permalink
Test proxies
Browse files Browse the repository at this point in the history
  • Loading branch information
DarkaOnLine committed Jul 12, 2019
1 parent 907076d commit 3feea73
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tests/GeneratorTest.php
Expand Up @@ -106,9 +106,15 @@ public function canSetProxy()
$this->setAnnotationsPath();

$cfg = config('l5-swagger');
$cfg['proxy'] = '*';
$proxy = '99.56.62.66';
$cfg['proxy'] = $proxy;
config(['l5-swagger' => $cfg]);

$this->get(route('l5-swagger.api'))
->assertStatus(200);

$this->assertEquals(\Request::getTrustedProxies()[0], $proxy);

$this->get(route('l5-swagger.docs'))
->assertStatus(200);

Expand Down

0 comments on commit 3feea73

Please sign in to comment.