Commit graph

31 commits

Author SHA1 Message Date
snipe 6a67426140 Create travis user? I don’t know wqhy it’s still looking for a travis user 2017-08-24 17:21:50 -07:00
snipe d0637d38f3 More travis fixes 2017-08-23 13:32:30 -07:00
snipe 7141968d64 Trying to fix travis. Again. Always. 2017-08-23 13:22:01 -07:00
Daniel Meltzer d12159c042 Fix travis with new observer code (#3683)
* Rearrange travis order in attempt to fix null settings.

* Use auth::id instead of fetching it off the user.  Fixes a null object reference during seeding.
2017-06-20 20:38:13 -07:00
Andrea Bergamasco 7ee172888d /api_tests: Completed tests for basic CRUD for Assets and Components (#3426)
* Refactored AssetsTransformer

Casted all ids to int, escaped all text values,

* Added warranty_expires attribute to Asset model

$asset->warranty_expires contains a Carbon object with the warranty
expiration date. Returns null when either purchase_date or
warranty_months are not set.

* Ignoring php-cs cache files

* Restored asset tests expectations

Work in progress - tests still fail

* API controller refactoring, fixed HTTP status codes in responses

* Restored $request->get - debugging

* Added further checks in ApiAssetsCest::updateAssetWithPatch

* /api_tests: Fixed bugs in update() method + code formatting

* /api_tests: Minor code formatting

* /api_tests: Mirrored test code for PATCH and PUT methods

* Removed repeated code

* Test cleanup

* Fixed issues with update() through PATCH and PUT methods

* Added API test suite to .travis.yml
2017-03-31 13:48:11 -07:00
Daniel Meltzer df4c7e32b1 Another Travis Fix (#3211)
Make sure we use the testing env for passport:install so we write to the correct db.
2017-01-19 11:48:06 -08:00
snipe aefbb76592 Possible fix for acceptance tests (needs oauth key) 2017-01-11 15:14:33 -08:00
Daniel Meltzer fd450e2773 Two asset maintence related fixes (#3101)
* Fix maintenances create button, and post to the proper route in maintences edit

* Fix consumable tab when active.

* Fix an html formatting error that resulted in us not closing a form.  This would cause the checkin page to try to submit a delete request (related to the modal form) rather than the desired checkin request.  Also fix formatting in this file.

* Use log mail driver for testing, should fix the functional issue.  Disable acceptance tests on travis for now.

* Fix Category edit page.

* EOL Can be null.
2016-12-26 15:17:12 -08:00
Daniel Meltzer 323c3807fa Cleanup controller escaping (#3084)
* Make delete routes work.  We put a little form in the modal that spoofs the delete field.

* Fix route on creating a user.

* Fix redundant id parameter.

* Port acceptance tests to new urls.

* Initial work on migrating to model based policies instead of global gates.  Will allow for much more detailed permissions bits in the future.

* This needs to stay for the dashboard checks.

* Add user states for permissions to build tests.

* Build up unit tests for gates/permissions.  Move accessories/consumables/assets to policies instead of in authserviceprovider

* Migrate various locations to new syntax.  Update test to be more specific

* Fix functional tests.

Add an artisan command for installing a settings setup on travis-ci

* Try a different id... Need to come up with a better way of passing the id for tests that need an existing one.

* Try to fix travis

* Update urls to use routes and not hardcode old paths.  Also fix some migration errors found along the way.:

* Add a environment for travis functional tests.

* Adjust config file to make travis use it.

* Use redirect()->route instead of redirect()-to

* Dump all failures in the output directory if travis fails.

* Cleanups and minor fixes.

* Adjust the supplier modelfactory to comply with new validation restrictions.

* Some test fixes.

* Locales can be longer than 5 characters according to faker... fex gez_ET.  Increase lenght in mysql and add a validation

* Update test database dump to latest migrations.

* Extend Supplier phone/fax length.

This catches issues found in testing with a phone number with a five digit extension.  fex (356) 654-3024 x36632

Also move away from escaping all values put into eloquent.  Eloquent
already uses PDO parameter binding, and this was leading to names like
Mr Ryan O'Malley turning into an html escaped version of that name when
stored.  All values should be escaped when using {{}}, we'll just have
to be more cautious when we use {!!, but I think we already are?

* Remove additional escaping here, like we did in suppliers controller.

* No need to eager load all of these relationships when we can call the count on the querybuilder directly

* Work on controller cleanup

* Always start from scrach, catches more issues this way.

* Update sql dump.  Remove old code from permissions test.

* Generate a deletable item on demand in the test, rather than relying on one existing.  I think we should probably move to mock all the database stuff at some point..

* More travis related fixes

* Break script into multiple functional lines

* Update all controllers to use the new helper, also cleanup syntax and docblocks along the way.
2016-12-19 22:00:50 -08:00
Daniel Meltzer cd8c585377 Discussion: Moving to policies for controller based authorization (#3080)
* Make delete routes work.  We put a little form in the modal that spoofs the delete field.

* Fix route on creating a user.

* Fix redundant id parameter.

* Port acceptance tests to new urls.

* Initial work on migrating to model based policies instead of global gates.  Will allow for much more detailed permissions bits in the future.

* This needs to stay for the dashboard checks.

* Add user states for permissions to build tests.

* Build up unit tests for gates/permissions.  Move accessories/consumables/assets to policies instead of in authserviceprovider

* Migrate various locations to new syntax.  Update test to be more specific

* Fix functional tests.

Add an artisan command for installing a settings setup on travis-ci

* Try a different id... Need to come up with a better way of passing the id for tests that need an existing one.

* Try to fix travis

* Update urls to use routes and not hardcode old paths.  Also fix some migration errors found along the way.:

* Add a environment for travis functional tests.

* Adjust config file to make travis use it.

* Use redirect()->route instead of redirect()-to

* Dump all failures in the output directory if travis fails.

* Cleanups and minor fixes.

* Adjust the supplier modelfactory to comply with new validation restrictions.

* Some test fixes.

* Locales can be longer than 5 characters according to faker... fex gez_ET.  Increase lenght in mysql and add a validation

* Update test database dump to latest migrations.
2016-12-19 11:04:28 -08:00
snipe 899493e4d5 Not so much for the nightlies ;) 2016-12-14 11:23:18 -08:00
snipe fb0cce0640 Try nightly and latest 5.6.4 2016-12-14 11:01:32 -08:00
snipe 4753d70946 Travis doesn’t support 5.6.4, so remove it 2016-12-14 11:00:03 -08:00
snipe a8d5d4a446 Specified PHP 5.6.4 for unit tests 2016-12-14 06:36:25 -08:00
snipe 7d5e9fb135 Updated travis with new cli commands 2016-04-19 02:30:59 -07:00
snipe 65fe564774 Pull the acceptance tests. Again. :(
Giving up.
2016-04-13 05:20:40 -07:00
snipe 2026a91bde Remove < PHP 5.6, since Laravel 5.2 requires PHP 5.6 2016-04-13 04:31:28 -07:00
snipe 62b3653e7c Fixed CI db stuff 2016-04-13 01:08:02 -07:00
snipe 91c9a08d29 Switch back to testing-ci 2016-04-13 01:01:03 -07:00
snipe 1eeb4d042a Sigh. 2016-04-13 00:56:43 -07:00
snipe 454d0daa25 This won't work either, but running out of ideas 2016-04-13 00:45:42 -07:00
snipe 7083bb50ca Remove sqlite references (duh) 2016-04-12 23:56:13 -07:00
snipe 561bf038f7 Remove sqlite env var 2016-04-12 23:45:14 -07:00
snipe 4def8b7349 Try mysql for travis 2016-04-12 23:43:53 -07:00
snipe a6a6edfeaa Updated travis.yml 2016-04-12 21:01:39 -07:00
snipe 39c7439be6 Removed custom phantomJS stuff - it's 404ing 2016-04-12 20:21:53 -07:00
snipe a306574751 Check whether the login page even loads :( 2016-03-25 05:29:42 -07:00
snipe f902e3b8ce Another try fixing phantom 2016-03-25 05:21:45 -07:00
snipe 938e940366 Try to build phantom manually 2016-03-25 05:05:11 -07:00
snipe 7c985ad495 Possible fix for travis (haha yeah right) 2016-03-25 04:48:26 -07:00
snipe fe00b0e401 Version 3 - hold onto your butts 2016-03-25 01:18:05 -07:00