Skip to content

Make it easier to update test fixtures #15607

Open
@chrismytton

Description

Problem

At the moment updating the test fixtures involves lots of bitty steps that are easy to get wrong. This means that the tests run against quite an old version of everypolitician-data. It would be good to make this easier so we can test the app against newer versions of the data.

Proposed Solution

Add a rake task which updates t/fixtures/countries.json (which is currently called d8a4682f-countries.json) and the files in t/fixtures/everypolitician-data to the latest version on the everypolitician-data master branch.

This will involve going through the output from git grep stub_ t/ and removing any hard-coded SHAs and moving those into a single central data file. This way the SHAs are tracked under source control but don't need to be updated in the individual tests each time.

Acceptance Criteria

Updating the test fixtures to the latest version should only require one command.

Related Issues

This is needed in order to do #15606 because the current version of the fixtures don't have the type column in the unstable/positions.csv, so it's awkward to add a test for the Position#type method.

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions