I’m using Yesod to write a REST API server that calls out to another REST API server as part of many of its handlers using http-conduit. I’ve been following the example set by the scaffolded tests in writing integration tests for my handlers, which works great if the only set-up I need to do for my test is alter the database state.How do I test Yesod handlers that make calls to an external API server without actually hitting the external server? To be clear, I can write the handlers so that they make the correct calls to the external API, I just haven’t figured out how to isolate that aspect in testing. I read Unit Testing IO in Haskell which sounds like what I’m looking for, except I want to make it work in yesod-test.
--
You received this message because you are subscribed to the Google Groups "Yesod Web Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to yesodweb+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to yesodweb+unsubscribe@googlegroups.com.