mirror of
https://gitea.invidious.io/iv-org/shard-radix.git
synced 2024-08-15 00:43:21 +00:00
spec: ensure Node usage is tracked
Add missing spec for disable of node payload when collecting the usage of them in `Result`.
This commit is contained in:
parent
7f348cae8c
commit
c79f4e5c21
1 changed files with 9 additions and 0 deletions
|
@ -62,6 +62,15 @@ module Radix
|
||||||
result.payload?.should be_truthy
|
result.payload?.should be_truthy
|
||||||
result.payload.should eq(node.payload)
|
result.payload.should eq(node.payload)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it "allow not to assign payload" do
|
||||||
|
node = Node.new("/", :root)
|
||||||
|
result = Result.new
|
||||||
|
result.payload?.should be_falsey
|
||||||
|
|
||||||
|
result.use node, payload: false
|
||||||
|
result.payload?.should be_falsey
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue