# How to test DELETE :destroy with Shoulda

**URL:** <https://www.ruby-forum.com/t/how-to-test-delete-destroy-with-shoulda/192463>\
**Category:** Rails\
**Created:** [July 30, 2010, 6:24pm UTC](https://www.ruby-forum.com/t/how-to-test-delete-destroy-with-shoulda/192463 "2010-07-30T18:24:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![arigo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/c57346/32.png) [@arigo](https://www.ruby-forum.com/u/arigo)\
**Post date:** [July 30, 2010, 6:24pm UTC](https://www.ruby-forum.com/t/how-to-test-delete-destroy-with-shoulda/192463/1 "2010-07-30T18:24:29Z")

</div>

Hi,

I tried to find some help in Shoulda list without a positive result. I  
am able to test DELETE :destroy with Test::Unit but I cannot with  
Shoulda because instead of a 302 (redirect) I get 200.

Do you have a basic and simple example on how to test the delete part  
of the CRUD?

Thanks.

---

<div class="post-metadata">

**Author:** ![arigo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/c57346/32.png) [@arigo](https://www.ruby-forum.com/u/arigo)\
**Post date:** [August 2, 2010, 12:21pm UTC](https://www.ruby-forum.com/t/how-to-test-delete-destroy-with-shoulda/192463/2 "2010-08-02T12:21:11Z")

</div>

The problem is that when running the app with Mongrel I get a correct  
302 but when testing the answer is

You are being [redirected](http://test.host/%0Aconfigurations).

I am using Rails 2.3.8

I do not think that is correct, it seems a bug. Any reply at all?
