How independent should contexts be?
A more particular question: say I’m writing a blog and I want to make sure no posts are persisted in the database without a user tied to it. Where exactly do I make this check to make sure that always happen?
I’m currently doing this kind of checks in the context functions, and now that I’m increasing the number of contexts in my application I find myself importing a lot of the application just to write context tests, which gives me the feeling that I’m doing it wrong and that there might be a better way to do it.
Any tips on that one?