Skip to content
This repository was archived by the owner on May 12, 2025. It is now read-only.

Theory data in tests should include expected output #36

@RPM1984

Description

@RPM1984

Currently we use theory data to control assertions, e.g here

This leads to some 'magic code' / checks, e.g:

if (id == 1)
{
    // some assertion
}

A better approach would be to setup the data in the controller/models via the tests (not hardcoded internally), and have the theory data include the expected model.

Then the assertions become a simple equality check on the JSON output.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions