testing - How to get the body of an email? -
i new testing using cucumber capybara. got application test flow is:'after submitting form, email sent user contains link app. in order access app have open mail , click link, redirect app.'. don't have access mail id. there way extract link , continue flow? have tried not working. below snippet trying:
path_regex = /(?:"https?\:\/\/.*?)(\/.*?)(?:")/ email = actionmailer::base.deliveries.last path = email.body.match(path_regex)[1] visit(path)
its showing 'unknown error:'url' must string' error. can 1 me it?
i use mailcatcher works how you're describing.
Comments
Post a Comment