modernise redirect tests by converting to using url helpers
Make file_name in get_attachment route optional
render_for_text doesn't exist anymore. Replace with render :text
Clear out ActionMailer::Base.deliveries before each test. Rspec should be doing this but isn't for controller tests