(c *C)
| 146 | } |
| 147 | |
| 148 | func (s *LocalRepoCollectionSuite) TestUpdateLoadComplete(c *C) { |
| 149 | repo := NewLocalRepo("local1", "Comment 1") |
| 150 | c.Assert(s.collection.Update(repo), IsNil) |
| 151 | |
| 152 | collection := NewLocalRepoCollection(s.db) |
| 153 | r, err := collection.ByName("local1") |
| 154 | c.Assert(err, IsNil) |
| 155 | c.Assert(r.packageRefs, IsNil) |
| 156 | |
| 157 | repo.packageRefs = s.reflist |
| 158 | c.Assert(s.collection.Update(repo), IsNil) |
| 159 | |
| 160 | collection = NewLocalRepoCollection(s.db) |
| 161 | r, err = collection.ByName("local1") |
| 162 | c.Assert(err, IsNil) |
| 163 | c.Assert(r.packageRefs, IsNil) |
| 164 | c.Assert(r.NumPackages(), Equals, 0) |
| 165 | c.Assert(s.collection.LoadComplete(r), IsNil) |
| 166 | c.Assert(r.NumPackages(), Equals, 2) |
| 167 | } |
| 168 | |
| 169 | func (s *LocalRepoCollectionSuite) TestForEachAndLen(c *C) { |
| 170 | repo := NewLocalRepo("local1", "Comment 1") |
nothing calls this directly
no test coverage detected