spec/unit/rule/key_spec.rb in dry-logic-0.2.3 vs spec/unit/rule/key_spec.rb in dry-logic-0.3.0
- old
+ new
@@ -54,11 +54,11 @@
expect(result.to_ast).to eql([
:input, [
:address,
[:result, [
{ city: "NYC" },
- [:set, [[:result, [{ city: 'NYC' }, [:val, [:predicate, [:key?, [:zipcode]]]]]]]]
+ [:set, [[:result, [{ city: 'NYC' }, [:val, [:predicate, [:key?, [[:name, :zipcode], [:input, {:city=>"NYC"}]]]]]]]]]
]]
]
])
end
end
@@ -91,11 +91,11 @@
:input, [
:nums, [
:result, [
[1, '3', 3],
[:each, [
- [:el, [0, [:result, [1, [:val, [:predicate, [:str?, []]]]]]]],
- [:el, [2, [:result, [3, [:val, [:predicate, [:str?, []]]]]]]]
+ [:el, [0, [:result, [1, [:val, [:predicate, [:str?, [[:input, 1]]]]]]]]],
+ [:el, [2, [:result, [3, [:val, [:predicate, [:str?, [[:input, 3]]]]]]]]]
]]
]
]
]
])