TDD: 16 examples passing. Adds EVENTS constant, active/for_event scopes, and matches_reservation? with unit_ids/categorias/permanencias filters. Also adds captain_reservation factory used by the spec. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
16 lines
443 B
Ruby
16 lines
443 B
Ruby
# frozen_string_literal: true
|
|
|
|
FactoryBot.define do
|
|
factory :captain_lifecycle_rule, class: 'Captain::Lifecycle::Rule' do
|
|
account
|
|
sequence(:name) { |n| "Rule ##{n}" }
|
|
enabled { true }
|
|
event { 'checkin.scheduled_at' }
|
|
offset_minutes { -10 }
|
|
filters { {} }
|
|
message_type { 'text' }
|
|
message_body { 'Olá {{ customer.first_name }}, sua suíte {{ reservation.suite }} está pronta!' }
|
|
priority { 50 }
|
|
end
|
|
end
|