test fixes

This commit is contained in:
Hayden 2023-01-27 14:07:13 -09:00
parent f1f455f8aa
commit ad6115770d
No known key found for this signature in database
GPG key ID: 17CF79474E257545
2 changed files with 3 additions and 2 deletions

View file

@ -356,7 +356,6 @@ func (e *ItemsRepository) QueryByGroup(ctx context.Context, gid uuid.UUID, q Ite
}
// QueryByAssetID returns items by asset ID. If the item does not exist, an error is returned.
func (e *ItemsRepository) QueryByAssetID(ctx context.Context, gid uuid.UUID, assetID AssetID, page int, pageSize int) (PaginationResult[ItemSummary], error) {
qb := e.db.Item.Query().Where(

View file

@ -36,6 +36,8 @@ func useItems(t *testing.T, len int) []ItemOut {
for _, item := range items {
_ = tRepos.Items.Delete(context.Background(), item.ID)
}
_ = tRepos.Locations.Delete(context.Background(), location.ID)
})
return items