This has been
discussed a bit before, I think, but I couldn't find any real solution. I'm trying to understand how to test my update function, and in particular how to test it when one call may produce new Cmds which I also want to process.
It seems simple enough to test a single call to update: just pass in a Msg and a Model and check the Model that's returned. Ideally, though, I'd like to be able to a) check the msgs in the resulting Cmd and b) route those messages through update as well. It seems that if I can do (a) then I could do (b) straightforwardly.
Is there a way to do this? Even if I can't explicitly inspect the contents of the Cmd, is there a way to "route" that Cmd back to my update function?