1
1
Fork 0
mirror of https://code.mensbeam.com/MensBeam/Arsse.git synced 2024-12-23 09:02:41 +00:00
Commit graph

18 commits

Author SHA1 Message Date
J. King
c9c6891567 Implement TTRSS getCategories; fixes #81 2017-10-07 12:46:05 -04:00
J. King
5488b994f7 Merged master; CS fixes 2017-09-28 10:16:24 -04:00
J. King
e74a3ae3cb Fix numerous bugs when adding or changing folders
- Specifying a non-integer parent no longer silently casts to 0 or 1
- Specifying a folder ID of 0 now always converts to null automatically
- Performing both a rename and move to root in the same operation no longer results in potential duplicates
- Calling folderSetProperties with an empty data array no peforms an update; it now returns false before the update call
- Modification timestamps are now actually updated when a folder is modified
- Constraint violation exceptions triggered by code (rather than the database) now print a message
- Renaming a folder or subscription to a non-string value (e.g. an array) throws an exception rather than silently casting
- Added tests to better cover all the above
- Centralized the normalization of integers and title strings into a new ValueInfo static class
2017-09-26 16:45:41 -04:00
J. King
f7e50fe95d Passed code through linter 2017-08-29 10:50:31 -04:00
J. King
52104fb647 Implement article cleanup; fixes #28 2017-08-17 22:36:15 -04:00
J. King
4066bba05e Full code coverage for Database class
- Fixes #49
2017-07-22 23:08:08 -04:00
J. King
da092d5f8c Changed Misc\DateFormatter to a collection of static methods and renamed it to Date; renamed Data to Arsse to avoid confusion and better reflect its centrality 2017-07-17 07:47:57 -04:00
J. King
7e458dddbc More test re-organization 2017-06-18 12:48:29 -04:00
J. King
845b47e656 Re-organize test data for Database tests 2017-06-18 12:24:19 -04:00
J. King
88c0f4986c Implement NCN API v1-2 feed handling: tests
- Fixes #8
- Fixes #9
- Fixes #10
- Fixes #11
- Fixes #12

- Differentiated between a missing ID which is the subject of an action (e.g. the subscription when moving a subscription) and other missing IDs (e.g. the folder when moving a subscription)
- Enforced same rules for subscription titles as for folder names, save that null is valid for subscriptions
2017-05-21 10:10:36 -04:00
J. King
98c950de58 Removed most calls to userExists()
- functions not related to user management now have the existence of the affected user checked in the authorizer, when the affected user differs from the actor
- User::authorizationEnabled() now nests: disabling twice and then enabling once leaves the authorizer disabled
- Disabling of the authorizer is now tested
- User tests now use a partial mock instead of relying on User::authorizationEnabled()
- Added authorizer tests against a missing user
- Removed folder tests related to missing users
- Also added more subscription tests
2017-05-11 18:00:35 -04:00
J. King
554beacfdb Improved database tests
- Centralized initial state; this will be useful due to foreign key interdependence
- Added nextID() method to make insert tests less brittle
2017-05-10 21:21:23 -04:00
J. King
718c5a04dd Add authz verification to folder tests 2017-04-01 15:06:34 -04:00
J. King
1e1b848c62 Remove root field from folders table
The field is no longer required with the use of recursive common table expressions, and  presents a possible loss of referential integrity
2017-04-01 14:49:31 -04:00
J. King
a111bcc231 Folder get/set prop funcs and other changes
- Simplified folder removal; now properly relies on foreign keys for dependency resolution
- simplified *propertiesSet() methods by offloading input validation and query building to a generic function
- Implemented function to get the properties of a single folder (useful for internal use)
- Implemented a function to set the properties of a folder
2017-04-01 10:27:26 -04:00
J. King
2344911f78 Tests for removing folders 2017-03-31 18:48:24 -04:00
J. King
458eaac5c6 Tests for listing folders
- Fixed checking for existence of parent before listing
- Changed Result->getAll() to return an empty array rather than null for an empty result set
2017-03-31 17:42:28 -04:00
J. King
b68cea1188 Tests for adding folders 2017-03-31 15:27:59 -04:00