mirror of
https://github.com/hay-kot/homebox.git
synced 2025-08-04 08:40:28 +00:00
test fixes
This commit is contained in:
parent
f1f455f8aa
commit
ad6115770d
2 changed files with 3 additions and 2 deletions
|
@ -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(
|
||||
|
@ -372,7 +371,7 @@ func (e *ItemsRepository) QueryByAssetID(ctx context.Context, gid uuid.UUID, ass
|
|||
pageSize = -1
|
||||
}
|
||||
|
||||
items, err := mapItemsSummaryErr(
|
||||
items, err := mapItemsSummaryErr(
|
||||
qb.Order(ent.Asc(item.FieldName)).
|
||||
WithLabel().
|
||||
WithLocation().
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue