nabbe23
And pragmatically - this always happens at some point. Something something about deadlines and need to get this out yesterday.
Have seen all to many times I've broken a unit test in a code base that I did not intend to break, just to have an aha moment that I would have introduced a bug had that test not been present.
Unit tests are a trade off between development speed and stability (putting aside other factors, such as integration tests, etc). In large corporate settings, that stability could mean millions of dollars saved per bug.
That example you provided is a poor one and not really consistent with your point that unit tests are useless - the point is being made that that specific test of UserResource is useless, which I also agree with. Testing at the Resource level via integration test and Service level via unit test is probably sufficient.
Didn't realize myself until I was diagnosed with a sarcoma (1% of adult cancer diagnoses), MPNST (a single digit percentage of sarcomas).
Doctors scrambled to figure out what to do - first we should just cut it out, then, well maybe we should do chemo + radiation. A day before getting a port put in receive a phone call that "oops, chemo doesn't work, just cut it out and radiation afterwards."
Luckily I was in a good position to get multiple opinions and read the data myself.
Almost 2 years cancer free now and am so grateful, but looking at the data, it's all seems like a toss up unless you can just cut it out with clean margins.
I really can't help but think modern medicine is really missing the mark with the reactionary approach to disease in general, but of course I have no clue what to do about it.