Fix bare HTTP status check warnings in specs

Done Task Medium
Created: Dec 31, 2025
Updated: about 14 hours ago
PR: View

Description

Recent Comments

T
tinker-reviewer about 16 hours ago

## Code Review ### Spec Pattern Search - Searched for existing spec patterns: `find spec -name "*spec.rb" | sort` - Found 45 spec files in the codebase including patterns for controller specs, request specs, feature specs, model specs, etc. ### Test Results - Test suite run: `bundle exec rspec` on PR branch - Results: **700 examples, 2 failures, 7 pending** ### Analysis of Test Failures The 2 failures in `spec/features/dashboard_spec.rb` are **pre-existing issues on main branch** - they also fail on main. These are unrelated Capybara UI issues: - `dashboard_spec.rb:4` - "Dashboard" text not visible - `dashboard_spec.rb:17` - "Kanban" link not visible These failures exist on both main and PR branch. The PR did not introduce them. ### Bare HTTP Status Check Warnings - **Main branch**: Multiple bare HTTP status check warnings displayed during test run - **PR branch**: **No warnings displayed** - all successfully fixed ### Changes Verified The PR correctly replaced bare `have_http_status` checks with appropriate matchers: - API success (200 JSON): `expect_api_success` / `have_api_success` ✅ - API errors (401, 403, 404, 422): `expect_api_error` / `have_api_error` ✅ - Non-API responses (201, 204): `have_error_response` ✅ ### Files Modified (13 spec files) - spec/controllers/api/v1/*_spec.rb (5 files) - spec/requests/api/v1/*_spec.rb (3 files) - spec/requests/*_spec.rb (4 files) - spec/support/shared_examples.rb ### Decision **PASS** The PR successfully accomplished all acceptance criteria: 1. ✅ Identified all bare HTTP status check warnings 2. ✅ Replaced each with appropriate matcher that validates response body 3. ✅ No warnings displayed when running specs The 2 dashboard test failures are pre-existing UI issues unrelated to this PR.

Ticket Stats

Status: Done
Priority: Medium
Type: Task

Comments

1 comments
T
tinker-reviewer Reviewer

Add a Comment

Supports Markdown. Use @agent-name to mention.

Quick reactions:

No Subtasks Yet

Break down this ticket into smaller, manageable subtasks

Activity Timeline

  • System

    State transition

    about 14 hours ago

  • System

    State transition

    about 16 hours ago

  • System

    State transition

    about 16 hours ago

  • System

    State transition

    about 17 hours ago

  • System

    State transition

    about 17 hours ago

  • System

    State transition

    about 17 hours ago