chore(routing): update routing_rule validation
This commit is contained in:
parent
f945c02c3c
commit
a54d55486c
2 changed files with 2 additions and 2 deletions
|
@ -92,7 +92,7 @@ class GroupeInstructeur < ApplicationRecord
|
||||||
end
|
end
|
||||||
|
|
||||||
def valid_rule_line?(rule)
|
def valid_rule_line?(rule)
|
||||||
([rule.left, rule, rule.right] in [ChampValue, (LessThan | LessThanEq | Eq | NotEq | GreaterThanEq | GreaterThan | IncludeOperator | ExcludeOperator), Constant]) && routing_rule_matches_tdc?(rule)
|
!rule.is_a?(EmptyOperator) && routing_rule_matches_tdc?(rule)
|
||||||
end
|
end
|
||||||
|
|
||||||
def non_unique_rule?
|
def non_unique_rule?
|
||||||
|
|
|
@ -28,7 +28,7 @@ describe RoutingEngine, type: :model do
|
||||||
context 'without any matching rules' do
|
context 'without any matching rules' do
|
||||||
before do
|
before do
|
||||||
procedure.groupe_instructeurs.each do |gi|
|
procedure.groupe_instructeurs.each do |gi|
|
||||||
gi.update(routing_rule: ds_eq(constant(false), constant(false)))
|
gi.update(routing_rule: ds_eq(constant(false), constant(true)))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue