feat(webdav): resolve failing etag unit tests
This commit is contained in:
parent
b184f0f68f
commit
ab610bc33f
|
|
@ -1,4 +1,5 @@
|
||||||
import { describe, test, expect } from 'vitest';
|
import { describe, test, expect } from 'vitest';
|
||||||
|
import Login from '../Login';
|
||||||
|
|
||||||
// Basic existence test for Login component
|
// Basic existence test for Login component
|
||||||
// More complex auth tests require comprehensive context mocking which
|
// More complex auth tests require comprehensive context mocking which
|
||||||
|
|
@ -10,10 +11,9 @@ describe('Login - OIDC Features - Simplified', () => {
|
||||||
expect(true).toBe(true);
|
expect(true).toBe(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('Component module structure is valid', async () => {
|
test('Component module structure is valid', () => {
|
||||||
// Test that the module can be imported dynamically
|
// Test that the module can be imported statically
|
||||||
const module = await import('../Login');
|
expect(Login).toBeDefined();
|
||||||
expect(module).toBeDefined();
|
expect(typeof Login).toBe('function');
|
||||||
expect(module.default).toBeDefined();
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
@ -538,7 +538,7 @@ pub fn normalize_etag(etag: &str) -> String {
|
||||||
|
|
||||||
// Handle empty ETags or whitespace-only ETags
|
// Handle empty ETags or whitespace-only ETags
|
||||||
if result.trim().is_empty() {
|
if result.trim().is_empty() {
|
||||||
return "empty".to_string(); // Provide a consistent fallback
|
return "".to_string(); // Return empty string for empty ETags
|
||||||
}
|
}
|
||||||
|
|
||||||
result
|
result
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue