diff options
author | Illya Klymov <xanf@xanf.me> | 2019-09-10 12:10:51 +0300 |
---|---|---|
committer | Illya Klymov <xanf@xanf.me> | 2019-09-10 12:10:51 +0300 |
commit | 7f5d86d82e602f4eaed4e25521dfa7213fb07a1a (patch) | |
tree | a95a92c78cb0f91769152c3985e554d04b68d032 /spec/javascripts/dropzone_input_spec.js | |
parent | 4d542db508e454d4ed3a2cdb0a91aee67e1c5cd8 (diff) |
Fix FormData usage in karma tests
Diffstat (limited to 'spec/javascripts/dropzone_input_spec.js')
-rw-r--r-- | spec/javascripts/dropzone_input_spec.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/javascripts/dropzone_input_spec.js b/spec/javascripts/dropzone_input_spec.js index 326b2c029fb..ef899612b08 100644 --- a/spec/javascripts/dropzone_input_spec.js +++ b/spec/javascripts/dropzone_input_spec.js @@ -2,9 +2,9 @@ import $ from 'jquery'; import dropzoneInput from '~/dropzone_input'; import { TEST_HOST } from 'spec/test_constants'; -const TEST_FILE = { - upload: {}, -}; +const TEST_FILE = new File([], 'somefile.jpg'); +TEST_FILE.upload = {}; + const TEST_UPLOAD_PATH = `${TEST_HOST}/upload/file`; const TEST_ERROR_MESSAGE = 'A big error occurred!'; const TEMPLATE = `<form class="gfm-form" data-uploads-path="${TEST_UPLOAD_PATH}"> |