Skip to content

Testing | Sample view | Check response headers and problem code #3

@shivanshs9

Description

@shivanshs9

Write tests with a sample view to test all of the following behaviors:

  • When response HTTP status is 200, content type is "application/json".
  • When response HTTP status is 401, content type is "application/problem+json" and problem code is "not_authenticated".
  • When response HTTP status is 404, content type is "application/problem+json" and problem code is "not_found".
  • When response HTTP status is 500 (server error - crash your own view), content type is "application/problem+json" and problem code is "error".

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions