...

/

Controller Testing: Functional Tests

Controller Testing: Functional Tests

Learn about functional testing in Rails and test your controller actions.

You already know that your controllers are responsible for handling incoming web requests to the application. They respond to these requests by rendering views or interacting with the models.

Functional testing

In functional testing of your controllers, you want to check how the actions in your controller handle the various web requests and whether the expected response is received.

In your functional tests, you want to check things such as:

  • Whether the web request was successful
  • Whether the user was redirected to the right page
  • Whether the appropriate message was displayed to the user in the view
...