Build all package refs.

This commit is contained in:
Andrey Smirnov
2014-02-11 21:11:36 +04:00
parent bff299d268
commit c30862dff9
2 changed files with 14 additions and 0 deletions
+9
View File
@@ -238,3 +238,12 @@ func (s *PackageCollectionSuite) TestUpdateByKey(c *C) {
c.Assert(err, IsNil)
c.Assert(p2.Equals(s.p), Equals, true)
}
func (s *PackageCollectionSuite) TestAllPackageRefs(c *C) {
err := s.collection.Update(s.p)
c.Assert(err, IsNil)
refs := s.collection.AllPackageRefs()
c.Check(refs.Len(), Equals, 1)
c.Check(refs.Refs[0], DeepEquals, s.p.Key())
}