Skip to content

Commit

Permalink
Add test for withCredentials
Browse files Browse the repository at this point in the history
  • Loading branch information
wq9 committed Oct 12, 2017
1 parent ab8f666 commit 339f2b2
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/upload.html
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,16 @@
upload._uploadFile(file);
});

it('should propagate with-credentials to the xhr', done => {
upload.withCredentials = true;
upload.addEventListener('upload-start', e => {
e.preventDefault();
expect(e.detail.xhr.withCredentials).to.be.true;
done();
});
upload._uploadFile(file);
});

describe('Response Status', () => {
function expectResponseErrorForStatus(error, status, done) {
upload._createXhr = xhrCreator({
Expand Down

0 comments on commit 339f2b2

Please # to comment.