Testing a controller that makes outside api calls

I did have one problem with this approach - which was getting my api module to use the Bypass endpoint. It’s buried a few dependency layers beneath my tests, and I didn’t want to pass params all the way through.

My first stab was to use Application config to allow a url override, which I set at runtime in tests. Then (duh!) I realised this messed up async tests. Not wanting to spend more time on this for now, I’ve turned off ExUnit async for those tests, but I consider that a workaround rather than a fix. I’ve found since there’s some discussion of this exact problem at Bypass and async tests with ex_unit