support indexing top-level labels too

This commit is contained in:
2011-03-09 22:48:27 +00:00
parent 629f46ed89
commit cfbe58a509
2 changed files with 11 additions and 5 deletions

View File

@@ -113,10 +113,14 @@ describe Redistat::Key do
key.children.should have(1).item
key.children.map { |k| k.label.me }.should == members
members = db.smembers("#{@scope}#{Redistat::LABEL_INDEX}#{key.label.parent}") # checking ''
members.should have(0).item
members = db.smembers("#{@scope}#{Redistat::LABEL_INDEX}") # checking ''
members.should have(1).item
members.should include('message')
key.parent.should be_nil
key = Redistat::Key.new("PageViews")
key.children.should have(1).item
key.children.map { |k| k.label.me }.should include('message')
end
end