mirror of
https://github.com/jimeh/redistat.git
synced 2026-02-19 13:26:39 +00:00
added #parent_group method to Label and Key objects
This commit is contained in:
@@ -73,4 +73,10 @@ describe Redistat::Key do
|
||||
key.groups.map { |k| k.label }.should == result
|
||||
end
|
||||
|
||||
it "should know it's parent label group" do
|
||||
label = 'message/public/offensive'
|
||||
key = Redistat::Key.new(@scope, label, @date, {:depth => :hour})
|
||||
key.parent_group.should == 'message/public'
|
||||
end
|
||||
|
||||
end
|
||||
@@ -45,4 +45,10 @@ describe Redistat::Label do
|
||||
label.groups.should == [ "message" ]
|
||||
end
|
||||
|
||||
it "should know it's parent label group" do
|
||||
name = "message/public/offensive"
|
||||
label = Redistat::Label.new(name)
|
||||
label.parent_group.should == 'message/public'
|
||||
end
|
||||
|
||||
end
|
||||
Reference in New Issue
Block a user