mercredi 28 mai 2014

Rails4.1, devise 3.2.4, rspec feature, How I get confirmation_token?


Vote count:

0




I am trying to write a feature-spec with the following steps:



visit "/users/sign_up"
fill_in 'user_email', :with => 'dan@dan.net'
fill_in 'user_password', :with => 'abc123'
fill_in 'user_password_confirmation', :with => 'abc123'
click_button "Sign up"
dan_confirmation_token = get_confirmation_token
visit "/users/confirmation?confirmation_token=#{dan_confirmation_token}"


In previous versions of devise, I could get dan_confirmation_token directly from:



User.find_by_email('dan@dan.net').confirmation_token


But devise is more secure now.


What is the API call I use to get dan_confirmation_token ??


Dan



asked 32 secs ago






Aucun commentaire:

Enregistrer un commentaire