mirror of
https://github.com/jimeh/redistat.git
synced 2026-02-19 05:16:39 +00:00
added grouping support to Redistat::Label
This commit is contained in:
@@ -25,4 +25,17 @@ describe Redistat::Label do
|
||||
db.get("#{Redistat::KEY_LEBELS}#{label.hash}").should == name
|
||||
end
|
||||
|
||||
it "should separate label names into groups" do
|
||||
name = "message/public/offensive"
|
||||
label = Redistat::Label.new(name)
|
||||
label.name.should == name
|
||||
label.groups.should == [ "message/public/offensive",
|
||||
"message/public",
|
||||
"message" ]
|
||||
name = "message"
|
||||
label = Redistat::Label.new(name)
|
||||
label.name.should == name
|
||||
label.groups.should == [ "message" ]
|
||||
end
|
||||
|
||||
end
|
||||
Reference in New Issue
Block a user