feat(webdav): resolve failing etag unit tests

This commit is contained in:
perf3ct 2025-07-05 21:16:15 +00:00
parent 26c618f984
commit c6089dd1b2
2 changed files with 6 additions and 6 deletions

View File

@ -1,4 +1,5 @@
import { describe, test, expect } from 'vitest';
import Login from '../Login';
// Basic existence test for Login component
// More complex auth tests require comprehensive context mocking which
@ -10,10 +11,9 @@ describe('Login - OIDC Features - Simplified', () => {
expect(true).toBe(true);
});
test('Component module structure is valid', async () => {
// Test that the module can be imported dynamically
const module = await import('../Login');
expect(module).toBeDefined();
expect(module.default).toBeDefined();
test('Component module structure is valid', () => {
// Test that the module can be imported statically
expect(Login).toBeDefined();
expect(typeof Login).toBe('function');
});
});

View File

@ -538,7 +538,7 @@ pub fn normalize_etag(etag: &str) -> String {
// Handle empty ETags or whitespace-only ETags
if result.trim().is_empty() {
return "empty".to_string(); // Provide a consistent fallback
return "".to_string(); // Return empty string for empty ETags
}
result