Replaced broken `association :brand, factory: :captain_brand, account: account` (FactoryBot cannot evaluate `account` lazily that way) with a transient block that does `Captain::Brand.find_by(account_id: account.id) || association(...)`, ensuring the brand always belongs to the same account as the unit. Adds factory spec (6 examples) confirming standalone create, account override, and brand reuse all work correctly. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| assistant_response.rb | ||
| assistant.rb | ||
| brand.rb | ||
| copilot_message.rb | ||
| copilot_thread.rb | ||
| custom_tool.rb | ||
| document.rb | ||
| gallery_item.rb | ||
| inbox.rb | ||
| reservation.rb | ||
| scenario.rb | ||
| unit.rb | ||