I have devise 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.
# raise resouce.inspect # this is just to see if the test hits the
set_flash_message :notice, :destroyed
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
action and it did not raise it. I have also tried to test the 'new action'
just to see if it was hitting the right controller on the test and it
This means the mapping it correct for devise and its hitting the right
But on my test I am doing:
delete :destroy, :profile => active_profile #active_profile is an instance
of a factory
which should be the correct thing but it does not hit my action. I have
tried a lot of different combinations:
post :destroy, :method => :delete
I have also tried to use a debugger on it and I can see it passes the test
without hitting the action.
Can please somebody help me and tell me exactly what's the right call to
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firstname.lastname@example.org.
To post to this group, send email to email@example.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/e12142f4-ae4a-40cf-bcfd-fe182d9fc8e0%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.