Fix test
This commit is contained in:
parent
1c2e3a19ca
commit
0a2f952056
|
|
@ -17,6 +17,11 @@ window.__bs_data__ = {
|
||||||
scorePublic: 1
|
scorePublic: 1
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const csrf = document.createElement('meta');
|
||||||
|
csrf.name = 'csrf-token';
|
||||||
|
csrf.content = 'token';
|
||||||
|
document.head.appendChild(csrf);
|
||||||
|
|
||||||
test('display drap and drop notice', () => {
|
test('display drap and drop notice', () => {
|
||||||
const wrapper = mount(Upload, {
|
const wrapper = mount(Upload, {
|
||||||
stubs: ['file-upload']
|
stubs: ['file-upload']
|
||||||
|
|
@ -123,7 +128,8 @@ test('upload file', async () => {
|
||||||
body: expect.any(FormData),
|
body: expect.any(FormData),
|
||||||
credentials: 'same-origin',
|
credentials: 'same-origin',
|
||||||
headers: {
|
headers: {
|
||||||
Accept: 'application/json'
|
Accept: 'application/json',
|
||||||
|
'X-CSRF-TOKEN': 'token'
|
||||||
},
|
},
|
||||||
method: 'POST'
|
method: 'POST'
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user