fix: useAssetBrowser test failures

- Add default is_immutable: false to createApiAsset fixture

- Add second category to ownership tests requiring typeCategories.length > 1

Amp-Thread-ID: https://ampcode.com/threads/T-019c18d5-4ae7-72b2-ab01-644aa4739e13
Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
Alexander Brown
2026-02-01 03:00:39 -08:00
parent 5597776491
commit aa1aef17de

View File

@@ -36,6 +36,7 @@ describe('useAssetBrowser', () => {
created_at: '2024-01-01T00:00:00Z',
updated_at: '2024-01-01T00:00:00Z',
last_access_time: '2024-01-01T00:00:00Z',
is_immutable: false,
...overrides
})
@@ -462,6 +463,12 @@ describe('useAssetBrowser', () => {
createApiAsset({
name: 'another-my-model.safetensors',
is_immutable: false
}),
// Need a second category so typeCategories.length > 1
createApiAsset({
name: 'lora.safetensors',
is_immutable: true,
tags: ['models', 'loras']
})
]
@@ -586,6 +593,12 @@ describe('useAssetBrowser', () => {
name: 'public-model.safetensors',
is_immutable: true,
tags: ['models', 'checkpoints']
}),
// Need a second category so typeCategories.length > 1
createApiAsset({
name: 'lora.safetensors',
is_immutable: true,
tags: ['models', 'loras']
})
]