Skip to content

Commit 512c3f6

Browse files
authored
Merge pull request #2 from JCotton1123/JCotton1123-patch-1
Add negative test for variable in "in"
2 parents 3e9eae1 + bf82539 commit 512c3f6

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

test/json_logic_test.rb

+10
Original file line numberDiff line numberDiff line change
@@ -81,5 +81,15 @@ def test_in_with_variable
8181
},
8282
{ "x" => "foo"}
8383
)
84+
85+
assert_equal false, JSONLogic.apply(
86+
{
87+
"in" => [
88+
{"var" => "x"},
89+
{"var" => "y"},
90+
]
91+
},
92+
{ "x" => "foo", "y" => "bar" }
93+
)
8494
end
8595
end

0 commit comments

Comments
 (0)