I'm starting to break up my resources into separate modules using
Ash.Resource.Change
Ash.Resource.Change
and it's occurring to me it shouldn't be too difficult to test those modules in isolation.
If I have an
Ash.Resource.Change
Ash.Resource.Change
that just runs an
after_transaction
after_transaction
hook, how do I trigger that function directly?
Solution
At that point I might just make the function you pass to after_action a public function on the module and test that. At least I don't know of a good way to trigger the after action without running the whole action
The Elixir backend framework for unparalleled productivity. Declarative tools that let you stop wasting time. Use with Phoenix LiveView or build APIs in minutes for your front-end of choice.