BookStack/tests
Dan Brown ff8dadefee
Reviewed recycle bin API PR and made changes
Made the following changes, many of these are just to align with
existing conventions.

- Updated urls to be hypenated, instead of underscored, to match other system endpoints.
- Updated URL parameter to be `deletionId` instead of `id`, and removed the ID-based comment on controller methods, so the required ID model is clear from the URL alone, since its not clear from the URL endpoint alone like existing endpoints. This follows the pattern used in the "web" routes.
- Added extra detail on some controller method comments, and copied permission comment to each method.
- Removed existing field visibility mechanisms to use simpler model-based visibility since we didn't need anything too special here (After some of my other changes).
- Allowed the "deletable" model to be shown in response to provide a little more detail on the main deleted item.
- Updated parent/child-count loading to be on the "deletable" model instead of additional properties which results in simpler controller logic and enforces the idea these are relations on the deletable, not the deletion itself. It also removes additional exposure of model namespacing.
- Updated (int) casts to intval, just since that's our most common conversion method in the codebase.
- Testing: Removed `actingAsAuthorizedUser` and used the admin user instead to prevent extra auth steps on each test.
- Testing: Cut logic/data-checks from tests if already covered by other tests.
- Testing: Added simple assertions for delete/restore response data.
- Examples: Updated list example to reflect changes.

Review of PR #3377
To be followed up with changes to polymorphic relations to hide
namespacing.
2022-04-25 17:54:59 +01:00
..
Actions Fixed tests, applied StyleCI changes 2022-03-26 20:38:03 +00:00
Api Reviewed recycle bin API PR and made changes 2022-04-25 17:54:59 +01:00
Auth Split out settings view and made functional 2022-03-28 11:09:55 +01:00
Commands Applied latest styleci changes 2022-02-01 11:49:30 +00:00
Entity Added extendable/scalable formatter for webhook data 2022-03-26 16:53:02 +00:00
Helpers Applied latest styles changes from style CI 2021-10-16 16:01:59 +01:00
Permissions Split out settings view and made functional 2022-03-28 11:09:55 +01:00
Settings Fixed settings redirect issue and custom head display 2022-03-30 19:15:24 +01:00
test-data Added detection and thumbnail bypass for apng images 2022-01-04 13:10:35 +00:00
Unit Added option to configure PDF export paper size 2022-01-30 17:40:42 +00:00
Uploads Split out settings view and made functional 2022-03-28 11:09:55 +01:00
User Addressed test failures from users API changes 2022-02-04 01:02:13 +00:00
CreatesApplication.php Apply fixes from StyleCI 2021-06-26 15:23:15 +00:00
DebugViewTest.php Applied latest styleci changes 2021-10-15 14:16:45 +01:00
ErrorTest.php Apply fixes from StyleCI 2021-06-26 15:23:15 +00:00
FavouriteTest.php Apply fixes from StyleCI 2021-06-26 15:23:15 +00:00
HelpTest.php Updated with latest styleci changes 2022-02-08 15:29:58 +00:00
HomepageTest.php Improved custom homepage check on item deletion 2022-01-10 17:04:01 +00:00
LanguageTest.php Laravel 8 shift squash & merge (#3029) 2021-10-30 21:29:59 +01:00
OpenGraphTest.php Apply fixes from StyleCI 2021-06-26 15:23:15 +00:00
PublicActionTest.php Applied styleci changes 2021-09-26 15:48:22 +01:00
RecycleBinTest.php Applied styleci changes 2021-09-26 15:48:22 +01:00
SecurityHeaderTest.php Applied latest styleCI changes 2022-03-09 14:30:36 +00:00
SharedTestHelpers.php Laravel 8 shift squash & merge (#3029) 2021-10-30 21:29:59 +01:00
StatusTest.php Added testing for webhook management interface 2021-12-10 14:54:58 +00:00
TestCase.php Fixed dodgy test helper signature causing tests to fail 2021-09-18 21:29:42 +01:00
TestEmailTest.php Updated failing tests, Applied StyleCI changes 2021-12-18 16:41:42 +00:00
TestResponse.php Added testing coverage for tag index 2021-11-06 21:54:02 +00:00
ThemeTest.php Fixed tests, applied StyleCI changes 2022-03-26 20:38:03 +00:00