Fixed linting and failing test issues from dropzone work

This commit is contained in:
Dan Brown 2023-04-27 13:31:03 +01:00
parent a4a96a3df7
commit 1135d477ba
No known key found for this signature in database
GPG key ID: 46D9F943C24A2EF9
2 changed files with 5 additions and 3 deletions

View file

@ -1,4 +1,4 @@
import {onSelect, showLoading} from '../services/dom';
import {showLoading} from '../services/dom';
import {Component} from './component';
export class Attachments extends Component {

View file

@ -163,7 +163,8 @@ class ImageTest extends TestCase
$file = $this->files->imageFromBase64File('bad-php.base64', $fileName);
$upload = $this->withHeader('Content-Type', 'image/jpeg')->call('POST', '/images/gallery', ['uploaded_to' => $page->id], [], ['file' => $file], []);
$upload->assertStatus(302);
$upload->assertStatus(500);
$this->assertStringContainsString('The file must have a valid & supported image extension', $upload->json('message'));
$this->assertFalse(file_exists(public_path($relPath)), 'Uploaded php file was uploaded but should have been stopped');
@ -185,7 +186,8 @@ class ImageTest extends TestCase
$file = $this->files->imageFromBase64File('bad-phtml.base64', $fileName);
$upload = $this->withHeader('Content-Type', 'image/jpeg')->call('POST', '/images/gallery', ['uploaded_to' => $page->id], [], ['file' => $file], []);
$upload->assertStatus(302);
$upload->assertStatus(500);
$this->assertStringContainsString('The file must have a valid & supported image extension', $upload->json('message'));
$this->assertFalse(file_exists(public_path($relPath)), 'Uploaded php file was uploaded but should have been stopped');
}