I have this functional test which is failing, and I’m not sure why.
#Grab the post we want to update
get :edit, :id => @first_id
#Post the changes we want to make post :update, :id => @first_id, :body => "New Body" assert_response :redirect assert_redirected_to :action => 'list' #Verify that the changes were made successfully assert_equal "Post was successfully updated.", flash[:notice] post = BlogPost.find(@first_id) #My test fails on this next line assert_equal "New Body", post.body, "Expected bodies to match"
My “post :update” comes back successfully, but when I try and validate
that the post was actually updated, my test fails. The test fails
because the body wasn’t actually changed.
Does anyone have any insight they could share on this? Thanks in