How to test redirect_back_or_to
posted in today i learned
Have you ever successfully used redirect_back_or_to
in your application only to find out that testing was a challenge? Both methods rely on browser history which is generally not available within controller test and request specs. Recently I ran into this and after digging in came up with a simple solution.