Applying @dmeltzer’s changes from afc8ac5e72

This commit is contained in:
snipe 2018-07-24 20:21:19 -07:00
parent 7bb50a61a7
commit f69e34f6ca
2 changed files with 4 additions and 4 deletions

View file

@ -291,7 +291,7 @@ return [
Collective\Html\HtmlServiceProvider::class,
Spatie\Backup\BackupServiceProvider::class,
Fideloper\Proxy\TrustedProxyServiceProvider::class,
PragmaRX\Google2FA\Vendor\Laravel\ServiceProvider::class,
PragmaRX\Google2FALaravel\ServiceProvider::class,
Laravel\Passport\PassportServiceProvider::class,
Laravel\Tinker\TinkerServiceProvider::class,
Unicodeveloper\DumbPassword\DumbPasswordServiceProvider::class,
@ -365,7 +365,7 @@ return [
'Input' => Illuminate\Support\Facades\Input::class,
'Form' => Collective\Html\FormFacade::class,
'Html' => Collective\Html\HtmlFacade::class,
'Google2FA' => PragmaRX\Google2FA\Vendor\Laravel\Facade::class,
'Google2FA' => PragmaRX\Google2FALaravel\Facade::class,
'Debugbar' => Barryvdh\Debugbar\Facade::class,
'Image' => Intervention\Image\ImageManagerStatic::class,
'Carbon' => Carbon\Carbon::class,

View file

@ -25,14 +25,14 @@ class ApiCategoriesCest
$I->wantTo('Get a list of categories');
// call
$I->sendGET('/categories?order_by=id&limit=10');
$I->sendGET('/categories?sort=id&limit=10');
$I->seeResponseIsJson();
$I->seeResponseCodeIs(200);
$response = json_decode($I->grabResponse(), true);
// sample verify
$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)));
}