• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problems testing a destroy failure

 
Eric Hermann
Greenhorn
Posts: 6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
I'm trying to test an active record object destroy failure but I'm having problems creating a failure situation. I have a before_filter method called 'require_user_payment_info' which validates the @payment_info object before the delete method is called so I can't create a 'bad' @payment_info object before the delete method is called.

Here's the require_user_payment_info method:




And the actual delete method:



Any ideas?

Thanks!
 
Eric Hermann
Greenhorn
Posts: 6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bingo - here's my solution:



Thanks for your help!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic