(c *C)
| 99 | } |
| 100 | |
| 101 | func (s *LocalRepoCollectionSuite) TestAddByName(c *C) { |
| 102 | _, err := s.collection.ByName("local1") |
| 103 | c.Assert(err, ErrorMatches, "*.not found") |
| 104 | |
| 105 | repo := NewLocalRepo("local1", "Comment 1") |
| 106 | c.Assert(s.collection.Add(repo), IsNil) |
| 107 | c.Assert(s.collection.Add(repo), ErrorMatches, ".*already exists") |
| 108 | |
| 109 | r, err := s.collection.ByName("local1") |
| 110 | c.Assert(err, IsNil) |
| 111 | c.Assert(r.String(), Equals, repo.String()) |
| 112 | |
| 113 | collection := NewLocalRepoCollection(s.db) |
| 114 | r, err = collection.ByName("local1") |
| 115 | c.Assert(err, IsNil) |
| 116 | c.Assert(r.String(), Equals, repo.String()) |
| 117 | } |
| 118 | |
| 119 | func (s *LocalRepoCollectionSuite) TestByUUID(c *C) { |
| 120 | _, err := s.collection.ByUUID("some-uuid") |
nothing calls this directly
no test coverage detected