search for: test_delete_us

Displaying 1 result from an estimated 1 matches for "test_delete_us".

Did you mean: test_delete_user
2006 Feb 08
1
functional test problem
I am trying to write a test for my delete method. I find a User in the db by its id, do the delete action, then I want to see if it is still in the db. How do I check that the User IS Deleted without causing errors? ** My Test ******************************** def test_delete_user login user = User.find(2) post :delete_user, {:id => user.id} assert_equal "User deleted", flash[:notice] assert_nil User.find(2) assert_redirected_to :action => ''manage_users'' end ** The Error ******************************* 1) Err...