mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 14:47:19 -04:00
Add another case for block testing
This commit is contained in:
parent
9591c97448
commit
ad3839f4c1
1 changed files with 9 additions and 0 deletions
|
@ -38,4 +38,13 @@ describe LogStash::Util::HashEval, :if => true do
|
|||
# Make sure the "world" key is removed.
|
||||
insist { data["hello"] } == { "bar" => "baz" }
|
||||
end
|
||||
|
||||
it "should permit blocks #2" do
|
||||
str = "simple"
|
||||
code = subject.compile(str)
|
||||
m = eval(subject.compile(str))
|
||||
data = { "simple" => "things" }
|
||||
m.call(data) { |obj, key| obj.delete(key) }
|
||||
insist { data }.empty?
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue