Skip to content
This repository was archived by the owner on Nov 10, 2024. It is now read-only.
This repository was archived by the owner on Nov 10, 2024. It is now read-only.

POST: testing rails: controller tests are functional tests #22

@tamouse

Description

@tamouse

They are not integration tests, those are something else.

From the rails guide on testing:

8 Functional Tests for Your Controllers

In Rails, testing the various actions of a controller is a form of writing functional tests. Remember your controllers handle the incoming web requests to your application and eventually respond with a rendered view. When writing functional tests, you are testing how your actions handle the requests and the expected result or response, in some cases an HTML view.

8.1 What to include in your Functional Tests

You should test for things such as:

  • was the web request successful?
  • was the user redirected to the right page?
  • was the user successfully authenticated?
  • was the appropriate message displayed to the user in the view?
  • was the correct information displayed in the response?

Metadata

Metadata

Assignees

No one assigned

    Labels

    ideaAn idea for a blog post

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions