iachat/spec/factories/captain
Rodribm10 325f05c3eb fix(spec): captain_unit factory now auto-creates brand in matching account
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>
2026-04-15 09:36:52 -03:00
..
assistant_response.rb feat(ee): Add Captain features (#10665) 2025-01-14 16:15:47 -08:00
assistant.rb feat(ee): Add Captain features (#10665) 2025-01-14 16:15:47 -08:00
brand.rb chore(style): fix rubocop offenses and update typing indicators 2026-02-25 15:06:58 -03:00
copilot_message.rb feat: Add support for realtime-events in copilot-threads and copilot-messages (#11557) 2025-05-22 22:25:05 -07:00
copilot_thread.rb feat: Add support for realtime-events in copilot-threads and copilot-messages (#11557) 2025-05-22 22:25:05 -07:00
custom_tool.rb feat(ee): Captain custom http tools (#12584) 2025-10-06 07:53:15 -07:00
document.rb feat(ee): Add Captain features (#10665) 2025-01-14 16:15:47 -08:00
gallery_item.rb chore(style): fix rubocop offenses and update typing indicators 2026-02-25 15:06:58 -03:00
inbox.rb feat(ee): Add Captain features (#10665) 2025-01-14 16:15:47 -08:00
reservation.rb feat(lifecycle): add Captain::Lifecycle::Rule model with filter matching 2026-04-15 01:18:17 -03:00
scenario.rb feat: add Captain::Scenario Model and API [CW-4597] (#11907) 2025-07-14 16:12:38 +05:30
unit.rb fix(spec): captain_unit factory now auto-creates brand in matching account 2026-04-15 09:36:52 -03:00