mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
[ADF-2170] fixed condition for file size equal zero (#2860)
* [ADF-2170] fixed condition for file size equal zero * [ADF-2170] refactored if condition
This commit is contained in:
@@ -216,6 +216,17 @@ describe('UploadButtonComponent', () => {
|
||||
expect(addToQueueSpy.calls.mostRecent()).toBeUndefined();
|
||||
});
|
||||
|
||||
it('should allow file of 0 size when the max file size is set to 0', () => {
|
||||
const zeroFiles: File[] = [
|
||||
<File> { name: 'zeroFile.png', size: 0 }
|
||||
];
|
||||
component.maxFilesSize = 0;
|
||||
|
||||
component.uploadFiles(zeroFiles);
|
||||
|
||||
expect(addToQueueSpy.calls.mostRecent()).toBeDefined();
|
||||
});
|
||||
|
||||
it('should filter out all files if maxFilesSize is <0', () => {
|
||||
component.maxFilesSize = -2;
|
||||
|
||||
|
Reference in New Issue
Block a user