Add request specs for properties CRUD and resolve endpoint #51
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Type
Feature
Lineage
Standalone — identified in testing strategy audit (docs/testing-strategy.md).
Repo
ldraney/landscaping-assistantUser Story
As a developer,
I want request specs covering every properties endpoint and the resolve flow,
So that CI catches regressions in the core CRUD and address resolution before they reach production.
Context
A testing strategy audit revealed that the properties controller has significant gaps in request spec coverage. The
resolveendpoint — the core address resolution flow — has zero test coverage.show,edit,update, andcreateare also untested. The work queue, weekly view, uploads, and health endpoints all have solid request specs, but properties CRUD (the most-touched controller) does not.Geocoding is client-side only (Stimulus controllers calling Nominatim directly). There is no server-side NominatimService to test. This ticket covers server-side request specs only.
File Targets
Files the agent should create:
spec/requests/properties_spec.rb— extend existing file with specs for show, edit, update, create, resolveFiles the agent should read for context:
app/controllers/properties_controller.rb— all actionsapp/models/property.rb— validations, associationsconfig/routes.rb— route definitionsdocs/testing-strategy.md— gap analysisspec/requests/work_queue_items_spec.rb— reference for test style/patternsspec/requests/uploads_spec.rb— reference for test style/patternsFiles the agent should NOT touch:
Gemfile— no new gems needed.woodpecker.yaml— no CI changesAcceptance Criteria
GET /properties/:idreturns 200 with property contentGET /properties/:id/editreturns 200 with formPOST /propertiescreates a property and redirectsPOST /propertieswith invalid params returns unprocessable_entityPATCH /properties/:idupdates and redirectsPATCH /properties/:idwith invalid params re-renders editPOST /properties/resolvewith street + number finds or creates property, returns JSONPOST /properties/resolvewith existing address returns the existing propertyPOST /properties/resolvewithout street creates property with client_name onlyPOST /properties/resolvewith service_ids assigns servicesbundle exec rspecpasses with zero failuresTest Expectations
bundle exec rspec spec/requests/properties_spec.rbConstraints
Checklist
Related
landscaping-assistant— project board