mirror of
https://github.com/Bubka/2FAuth.git
synced 2025-03-15 07:28:30 +01:00
Fix namespaces
This commit is contained in:
parent
b5f8322ea3
commit
c717e6b279
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Unit\Api\v1\Controllers;
|
||||
namespace Tests\Api\v1;
|
||||
|
||||
use App\Models\User;
|
||||
use Illuminate\Support\Facades\Config;
|
||||
@ -19,14 +19,14 @@ public function test_api_calls_are_throttled_using_config()
|
||||
/**
|
||||
* @var \App\Models\User|\Illuminate\Contracts\Auth\Authenticatable
|
||||
*/
|
||||
$user = User::factory()->create();
|
||||
$user = User::factory()->create();
|
||||
$throttle = 5;
|
||||
|
||||
Config::set('2fauth.api.throttle', $throttle);
|
||||
|
||||
$this->actingAs($user, 'api-guard');
|
||||
|
||||
for ($i=0; $i < $throttle - 1; $i++) {
|
||||
for ($i = 0; $i < $throttle - 1; $i++) {
|
||||
$this->json('GET', '/api/v1/twofaccounts/count');
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Unit\Extensions;
|
||||
namespace Tests\Feature\Extensions;
|
||||
|
||||
use App\Extensions\RemoteUserProvider;
|
||||
use App\Models\User;
|
||||
@ -94,8 +94,8 @@ public function test_user_is_set_from_proxy_headers_even_if_name_is_long()
|
||||
|
||||
$this->app['auth']->shouldUse('reverse-proxy-guard');
|
||||
|
||||
$name = str_pad('john', 300, '_');
|
||||
$inDbName = substr($name, 0, 191);
|
||||
$name = str_pad('john', 300, '_');
|
||||
$inDbName = substr($name, 0, 191);
|
||||
$inDbEmail = substr($name, 0, 184) . '@remote';
|
||||
|
||||
$this->json('GET', '/api/v1/groups', [], [
|
||||
|
Loading…
Reference in New Issue
Block a user