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