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

19 commits

Author SHA1 Message Date
J. King
da80a8ffa6 Complete tests for database driver
- Fixes #62
2017-07-22 15:29:12 -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
d4674c61b2 More bug fixes
- use DateFormatter throughout the Feed class
- Ensure dates have TEXT affinity in SQLite, in case it matters
- Add a userPreAuth setting for when relying on the Web server to do authentication
2017-07-15 13:33:17 -04:00
J. King
c800852f3a Remove stubs to support non-HTTP authentication
Also removes authPreferHTTP setting
2017-05-26 13:06:06 -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
a67fe30408 Fix whitespace
Also fixed my editor so tabs won't happen again!
2017-04-06 21:41:21 -04:00
J. King
f902346b6c Eliminated passing of RuntimeData instances
- RuntimeData has now been replaced by a single static Data class
- The Data class has a load() method which fills the same role as the constructor of RuntimeData
- The static Lang class is now an instantiable class and is a member of Data
- All tests have been adjusted and pass
- The Exception tests no longer require convoluted workarounds: a simple mock  for Data::$l suffices; Lang tests also use a mock to prevent loops now instead of using a workaround
2017-03-28 18:50:00 -04:00
Dustin Wilson
7236020b8b Changed "NewsSync" to "Arsse" 2017-03-27 23:12:12 -05:00
J. King
007e3747ef Various database fixes
Authentication appears to be broken with a real database
2017-03-02 20:47:00 -05:00
J. King
000781dc36 Cover blank passwords in existing tests 2017-02-27 23:28:11 -05:00
J. King
e4852b581a Start on tests for authorization 2017-02-27 23:04:13 -05:00
J. King
a039e104cf Allow inspection of the mock internal database
This will allow testing of auto-provisioning in the internal database when using external drivers
2017-02-27 11:44:20 -05:00
J. King
798d7e7ab7 Added synthetic tests for external User drivers
Fixed two typos in external driver handling
2017-02-26 22:06:14 -05:00
J. King
b6a47fc366 Abstract synthetic User backend for later tests 2017-02-26 12:09:44 -05:00
J. King
be9ebf9ca1 Remove authz from User driver; moved to main class 2017-02-22 23:22:45 -05:00
J. King
8a0d021622 More User tests and resultant fixes 2017-02-20 19:04:08 -05:00
J. King
7785eb072b Complete rewrite of User class and other changes
- User-related database methods will now throw User\Exception upon errors
- Internal userAdd method can now generate random passwords
- Pursuant to above, dependency on password genrator has been added, and password-related methods now return strings instead of booleans
- User class methods now all explicitly follow different branches for internal/external/missing implementations
- various User class methods now perform auto-provisioning of the internal database when external implementations report success on users not in the database
- Tests have been adjusted to account for the above changes
- Lots is probably still broken
2017-02-20 17:04:13 -05:00
J. King
e6feb8de8d First basic test for User class
As the User class depends on the database and this has yet to be tested (though I'm fairly certain it works), the mock driver also acts as a mock of the required database functions, with both instances sharing a common storage structure. Later test series should separate the two.
2017-02-19 00:22:16 -05:00
J. King
574388665a Tidy up tests and User stuff
- Skeleton of mock internal driver
- Skeleton of test suite
- Re-arranged lots of code
- Made drive name localized (improves #37)
2017-02-17 19:22:50 -05:00