0

I recently upgraded to the latest Devise (3.1+), and I am aware that there have been some fundamental changes with regard to improved security. I have some Capybara feature specs which failed due to the fact that I needed to pass in @token into some Devise mailer views.

However, there is still one spec failing which tests a case where the token has expired. I simply did the following in the past:

@user.reset_password_sent_at = 1.year.ago

But it looks like this field in the User model is not being used anymore.

Simply put: How can I force a token to expire?

cbi
  • 71
  • 1
  • 5
  • Possible dup of http://stackoverflow.com/questions/18661663/upgrading-to-devise-3-1-getting-reset-password-token-is-invalid – beck03076 Dec 05 '13 at 10:12
  • The possible dup was referenced, and did help to solve the other errors. It does not seem to explain how to force a token to expire under 3.1 – cbi Dec 06 '13 at 08:23

0 Answers0