diff options
Diffstat (limited to 'spec/util_hashring_spec.lua')
-rw-r--r-- | spec/util_hashring_spec.lua | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/util_hashring_spec.lua b/spec/util_hashring_spec.lua index 05f053e4..4f6ec3a3 100644 --- a/spec/util_hashring_spec.lua +++ b/spec/util_hashring_spec.lua @@ -83,4 +83,11 @@ describe("util.hashring", function () end end); + it("should support values associated with nodes", function () + local r = hashring.new(128, sha256); + r:add_node("node1", { a = 1 }); + local node, value = r:get_node("foo"); + assert.is_equal("node1", node); + assert.same({ a = 1 }, value); + end); end); |