mirror of
https://github.com/snipe/snipe-it.git
synced 2025-03-05 20:52:15 -08:00
Applying @dmeltzer’s changes from afc8ac5e72
This commit is contained in:
parent
7bb50a61a7
commit
f69e34f6ca
|
@ -291,7 +291,7 @@ return [
|
||||||
Collective\Html\HtmlServiceProvider::class,
|
Collective\Html\HtmlServiceProvider::class,
|
||||||
Spatie\Backup\BackupServiceProvider::class,
|
Spatie\Backup\BackupServiceProvider::class,
|
||||||
Fideloper\Proxy\TrustedProxyServiceProvider::class,
|
Fideloper\Proxy\TrustedProxyServiceProvider::class,
|
||||||
PragmaRX\Google2FA\Vendor\Laravel\ServiceProvider::class,
|
PragmaRX\Google2FALaravel\ServiceProvider::class,
|
||||||
Laravel\Passport\PassportServiceProvider::class,
|
Laravel\Passport\PassportServiceProvider::class,
|
||||||
Laravel\Tinker\TinkerServiceProvider::class,
|
Laravel\Tinker\TinkerServiceProvider::class,
|
||||||
Unicodeveloper\DumbPassword\DumbPasswordServiceProvider::class,
|
Unicodeveloper\DumbPassword\DumbPasswordServiceProvider::class,
|
||||||
|
@ -365,7 +365,7 @@ return [
|
||||||
'Input' => Illuminate\Support\Facades\Input::class,
|
'Input' => Illuminate\Support\Facades\Input::class,
|
||||||
'Form' => Collective\Html\FormFacade::class,
|
'Form' => Collective\Html\FormFacade::class,
|
||||||
'Html' => Collective\Html\HtmlFacade::class,
|
'Html' => Collective\Html\HtmlFacade::class,
|
||||||
'Google2FA' => PragmaRX\Google2FA\Vendor\Laravel\Facade::class,
|
'Google2FA' => PragmaRX\Google2FALaravel\Facade::class,
|
||||||
'Debugbar' => Barryvdh\Debugbar\Facade::class,
|
'Debugbar' => Barryvdh\Debugbar\Facade::class,
|
||||||
'Image' => Intervention\Image\ImageManagerStatic::class,
|
'Image' => Intervention\Image\ImageManagerStatic::class,
|
||||||
'Carbon' => Carbon\Carbon::class,
|
'Carbon' => Carbon\Carbon::class,
|
||||||
|
|
|
@ -25,14 +25,14 @@ class ApiCategoriesCest
|
||||||
$I->wantTo('Get a list of categories');
|
$I->wantTo('Get a list of categories');
|
||||||
|
|
||||||
// call
|
// call
|
||||||
$I->sendGET('/categories?order_by=id&limit=10');
|
$I->sendGET('/categories?sort=id&limit=10');
|
||||||
$I->seeResponseIsJson();
|
$I->seeResponseIsJson();
|
||||||
$I->seeResponseCodeIs(200);
|
$I->seeResponseCodeIs(200);
|
||||||
|
|
||||||
$response = json_decode($I->grabResponse(), true);
|
$response = json_decode($I->grabResponse(), true);
|
||||||
// sample verify
|
// sample verify
|
||||||
$category = App\Models\Category::withCount('assets','accessories','consumables','components','licenses')
|
$category = App\Models\Category::withCount('assets','accessories','consumables','components','licenses')
|
||||||
->orderByDesc('created_at')->take(10)->get()->shuffle()->first();
|
->orderByDesc('id')->take(10)->get()->shuffle()->first();
|
||||||
$I->seeResponseContainsJson($I->removeTimestamps((new CategoriesTransformer)->transformCategory($category)));
|
$I->seeResponseContainsJson($I->removeTimestamps((new CategoriesTransformer)->transformCategory($category)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue