Search⌘ K
AI Features

A Product Test Fixture

Explore how to update functional tests when changing controller behavior in Rails 6. Learn to test user-visible cart functionality, including product addition and quantity handling, to ensure a smooth shopping experience.

We'll cover the following...

A test fixture

We changed the function of our controller, so we know that we need to update the corresponding functional test.

For starters, we only need to pass a product ID on the call to post. Next, we have to deal with the fact that we’re no ...