swmcc/second_breakfast

🧪 Add unit tests for models

Open

#60 创建于 2025年11月23日

在 GitHub 查看
 (0 评论) (0 反应) (0 负责人)HTML (0 fork)auto 404
good first issuetesting

仓库指标

Star
 (0 star)
PR 合并指标
 (PR 指标待抓取)

描述

Description

No test directory exists. Need to add comprehensive unit tests for all models.

Models to test

  • User model (authentication, validations, associations)
  • Recipe model (validations, Active Storage, Action Text)
  • Category model (validations, associations)
  • Basket model (associations, uniqueness)

Setup needed

  • Create test/ directory structure
  • Configure test database
  • Add fixtures or factories (consider FactoryBot)
  • Set up test helpers

Testing framework

Using Rails built-in Minitest or consider RSpec

贡献者指南