rubyforgood/voices-of-consent

Create box_request and box seed data from factories

Open

#311 opened on Oct 12, 2019

View on GitHub
 (1 comment) (0 reactions) (0 assignees)Ruby (80 forks)auto 404
Priority: Mediumbeginner friendlyhelp wanted

Repository metrics

Stars
 (40 stars)
PR merge metrics
 (PR metrics pending)

Description

Depends on #310

Using the factories, we'd like to create seeds to create ~30-50 box_requests (and boxes) with the to represent all parts of the box_request/box lifecycle. Here's a SO re referencing factories in seeds (https://stackoverflow.com/questions/5382295/how-can-i-use-factory-girl-in-db-seeds).

We'd like ~30-50 box_requests with random/different box_request_abuse_types that are calling list of traits, e.g. :designed_box, :review_completed, :design_claimed and additional traits like :research_needed (Note that abuse_type seeds were generated by the dev:setup command which called the dev seed data rake task.)

Reviewing a box creates some associated box_items, but we'd want to reference the trait intentionally so some boxes have at least one item that have "research required" and some that have none. That way when we walk the box through the lifecycle (requested, designed, researched, assembled, shipped, followed_up), we'll have some that skip the research step and some that don't.

Contributor guide