The whitelist versus $hidden point is the one that sticks. A new sensitive column staying private until someone adds it is the safer default. Does the admin users list ever need a field the public shape doesn't have, or do you add a separate admin resource for that?
Presence first then shape at every level makes sense, that's where the quiet pass hides. A few extra lines per test is a cheap price. Do you wrap that pair in a small helper so you don't repeat it, or do you just write it out each time?
I write it out each time, honestly. I tried a helper once and the failure message got vague about which level broke, so I kept the two asserts visible in each test. It is a bit repetitive, but when it fails I can see at a glance whether the relation is missing or the shape drifted.
That makes sense, a vague failure message is a bad trade for saving a few lines. Being able to see at a glance which level broke is worth the repetition. When a test does fail like that, is it usually the missing relation or the shape drift?
Praneet Brar
Building cool things like launch platforms
The whitelist versus $hidden point is the one that sticks. A new sensitive column staying private until someone adds it is the safer default. Does the admin users list ever need a field the public shape doesn't have, or do you add a separate admin resource for that?