40fdf25da2
add tests for text user relationship
...
cover that the created Text carries the supplied User, that
the controller persists the user from the session attribute,
and that any userId in the request body is ignored.
2026-05-02 21:27:49 +03:00
6668240126
update fake text repository for user
...
include the user when rebuilding Text instances in find and
getAll, preserving the rule that lookup methods return new
instances rather than stored references.
2026-05-02 21:27:45 +03:00
ed4440eec2
test scheduled node controller returns 404 when user missing
2026-05-01 10:25:24 +03:00
659f9b88f1
test scheduled node controller surfaces date error from use case
2026-05-01 10:24:43 +03:00
2eafe67f31
test scope schedule to requesting user
2026-05-01 10:19:03 +03:00
3711840669
test exclude future scheduled nodes
2026-05-01 10:18:47 +03:00
54e33f9b03
test empty schedule returns empty array
2026-05-01 10:18:32 +03:00
dd217e4142
test get todays schedule missing user
2026-05-01 10:18:02 +03:00
6d0b5d61e1
test get todays schedule null user id
2026-05-01 10:17:38 +03:00
4e2904a2b4
test get todays schedule null date
2026-05-01 10:17:10 +03:00
c9f1379496
remove default values from test helpers
2026-05-01 10:05:07 +03:00
636d2dc517
test get scheduled nodes endpoint
2026-05-01 09:58:28 +03:00
669bcf8d5e
style
2026-05-01 09:56:14 +03:00
e04931ac08
test that todays schedule only returns uncompleted nodes
2026-05-01 09:06:13 +03:00
8eeff2c4fe
add update method to fake scheduled node repo
2026-05-01 09:05:55 +03:00
1b2e44389c
add completed bool to scheduled node
2026-05-01 09:04:18 +03:00
07e34ffd46
add find by user method in plan repo
2026-05-01 09:02:34 +03:00
ec4dca87a6
test that all nodes up until given date are returned
2026-04-28 22:48:25 +03:00
2047cd72e7
test get todays schedule and use case with request
2026-04-28 22:38:43 +03:00
0ea300f4d2
add find by user method for scheduled nodes
2026-04-28 22:37:28 +03:00
a9265abeae
add node to scheduled node
2026-04-27 09:28:43 +03:00
8eb0f2366b
remove missed default value
2026-04-26 20:43:27 +03:00
b41652af71
remove default value in fake token generator
2026-04-26 10:51:03 +03:00
cd40483cd4
remove default values from user constructors
...
Forcing every call site to be explicit about admin status and
password eliminates a class of bugs where an unintended
isAdmin=false or empty passwordHash could silently slip through.
The CreateUserTest case that asserted the isAdmin default is
dropped since the default no longer exists.
2026-04-26 10:46:07 +03:00
f95adddaaf
fix code style in test files
2026-04-26 10:45:57 +03:00
13da7c311a
return utc from clock
2026-04-26 10:32:08 +03:00
2fe41a5fe7
no need to test concrete implementations
2026-04-26 10:23:57 +03:00
a65c9259fa
dont cast email to string, use new value method
2026-04-26 10:19:38 +03:00
bb6bd7cbb3
use FakePasswordHasher in tests to eliminate bcrypt cost
...
Add a trivial prefix-based PasswordHasher fake and inject it into the
three test files that exercise CreateUser or AuthenticateUser. Drops
the full phpunit suite from ~7.4s to ~30ms (about 224x) without
losing coverage: the round-trip through hash/verify still validates
that CreateUser stores something other than the plaintext and that
AuthenticateUser only succeeds on a matching hash.
CreateUserTest is also refactored to use a setUp method, matching
the pattern already used in AuthenticateUserTest and AuthControllerTest.
2026-04-26 09:06:26 +03:00
05374991c5
update plan controller tests for auth
2026-04-24 13:31:44 +03:00
edfe7259a3
test auth controller
2026-04-24 13:27:49 +03:00
40649ded8e
test admin middleware
2026-04-24 13:26:20 +03:00
cd2168c822
test auth middleware
2026-04-24 13:25:17 +03:00
2a281386a5
test create session
2026-04-24 13:24:01 +03:00
78ffb77f9f
add fake clock
2026-04-24 13:23:46 +03:00
057df09dda
add fake token generator
2026-04-24 13:23:23 +03:00
619ebd3907
add fake session repository
2026-04-24 13:22:06 +03:00
c2ade8a601
test fake session repository
2026-04-24 13:21:51 +03:00
fd5278b3fe
test authenticate user
2026-04-24 13:20:45 +03:00
73ade7f971
update tests for user password hash
2026-04-24 13:19:51 +03:00
a52bb18b13
store password hash in fake user repo
2026-04-24 13:19:00 +03:00
38cfd34645
test create user requires password
2026-04-24 13:18:00 +03:00
30b8cc2c74
test create user rejects duplicate email
2026-04-24 13:16:57 +03:00
64edec5141
implement find by email in fake user repo
2026-04-24 13:16:29 +03:00
b2fc6a7ded
test fake user repo find by email
2026-04-24 13:16:02 +03:00
dcb4df043e
store is admin in fake user repo
2026-04-24 13:15:12 +03:00
160181888d
test user has is admin flag
2026-04-24 13:14:20 +03:00
9d831915de
test create plan schedules nodes
2026-04-24 11:02:55 +03:00
0ff5043ba5
test create plan persists plan
2026-04-24 11:02:38 +03:00
165f08f04d
test create plan 404 when text not found
2026-04-24 11:02:20 +03:00