Here is a neat little trick when you need to test a verification flow in #PhoenixFramework: https://gist.github.com/wmnnd/cb80d4eae79d5d35b8229d6eec188ee5
It's a common pattern to pass a URL generator to a context function. But you can pass a function that captures the token with an Agent instead.