Rails/Devise: testing the user confirmation process

BACK STORY: I’m working on a Rails app template that is similar to the Rails Tutorial Sample App. The idea is to begin every app I ever start with a pre-made template so that I don’t have to plow through chapters 3 through 10 in Rails tutorial. I can have the app set up AND tested in just a few minutes. My source code is at https://github.com/jhsu802701/generic_app_template .

MY TASK: I’m in the process of replacing the Sample App’s original user authentication system with the devise gem. How do you set up the integration test for the CONFIRMATION process? When users sign up or change their email addresses, they are sent a link. When they visit that URL, they are confirmed.

MY PROBLEM: Are there any good examples on how to test the user confirmation process? In Minitest/Capybara tests I’ve set up, visiting the links doesn’t seem to confirm the URL, and I get error messages saying that I used the wrong confirmation code. I can’t possibly be the first person in the history of the world to try to do this, right?