Displaying 1 result from an estimated 1 matches for "soft_delet".
Did you mean:
soft_delete
2013 Jul 04
3
Rspec devise, testing extended RegistrationController action destroy
...ise 1.5.4 working with rails 3.0.20 and ruby 1.8.7 .
I have extended the destroy action from the RegistrationController, to soft
delete users instead of really deleting them from the database.
def destroy
# raise resouce.inspect # this is just to see if the test hits the
action
resource.soft_delete
set_flash_message :notice, :destroyed
sign_out resource
redirect_to new_session_path(resource)
end
This is working on the browser.
When I try to write a test to the delete action, I get the test as passed
but does not execute the code. Prove of that is I have put a raise on the...