Cross controller functional tests?


I have an online store and I would like to simulate a complete
shopping trip which involves several controllers? How can I write a
test that calls actions from different controllers in a particular
sequence? Something like the following which involves department,
product, cart_item, and cart controllers.

get department 5
check it has a link to product 4
get product 4
post cartitem/create
get cart
see that product 4 in in the cart


I want integration tests. Didn’t even know there were there.


This would be … Integration tests?

The site is a bit slow right now, but the article is great.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs