Api tests2 (#5098)

* Cleanup

* API tests for asset models and related cleanup/improvements

* Api license test.  Tests incomplete because create/update/destroy are not implemented yet in the controller

* API Category tests.

* Manufacturers API Test.

* Implement License Create/Update/Delete Methods for API and enable test.

* Add missing gate for api.  Fixes only superadmins being able to generate Personal Access Toekns
This commit is contained in:
Daniel Meltzer
2018-02-25 15:10:02 -05:00
committed by snipe
parent 7de8f71f58
commit 9ee2c6be57
14 changed files with 613 additions and 43 deletions
@@ -34,7 +34,7 @@ class AssetModelsTransformer
'id' => (int) $assetmodel->depreciation->id,
'name'=> e($assetmodel->depreciation->name)
] : null,
'assets_count' => $assetmodel->assets_count,
'assets_count' => (int) $assetmodel->assets_count,
'category' => ($assetmodel->category) ? [
'id' => (int) $assetmodel->category->id,
'name'=> e($assetmodel->category->name)