Skip to content

Commit

Permalink
test(firefox): try to fix weird test failure in FF
Browse files Browse the repository at this point in the history
  • Loading branch information
rnicholus committed Jan 8, 2015
1 parent 5a2717c commit ac1d705
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions test/unit/submit-validate-cancel.js
Expand Up @@ -99,16 +99,15 @@ if (qqtest.canDownloadFileAsBlob) {

it("handles a file rejected via onValidate callback", function(done) {
var filesValidated = 0,
fileTestHelper = helpme.setupFileTests(),
uploader = new qq.FineUploaderBasic({
validation: {
stopOnFirstInvalidFile: false
},
callbacks: {
onAllComplete: function(succeeded, failed) {
assert.equal(succeeded.length, 1, "wrong succeeded count");
assert.equal(failed.length, 0, "wrong failed count");
assert.equal(uploader.getUploads({id: 0}).status, qq.status.UPLOAD_SUCCESSFUL);
assert.equal(succeeded.length, 0, "wrong succeeded count");
assert.equal(failed.length, 1, "wrong failed count");
assert.equal(uploader.getUploads({id: 0}).status, qq.status.UPLOAD_FAILED);
assert.equal(uploader.getUploads({id: 1}).status, qq.status.REJECTED);
done();
},
Expand All @@ -123,14 +122,10 @@ if (qqtest.canDownloadFileAsBlob) {
});

qqtest.downloadFileAsBlob(testImgKey, testImgType).then(function(blob) {
fileTestHelper.mockXhr();

uploader.addFiles([
{blob: blob, name: "name1"},
{blob: blob, name: "name2"}
]);

fileTestHelper.getRequests()[0].respond(200, null, JSON.stringify({success: true}));
});
});

Expand Down

0 comments on commit ac1d705

Please sign in to comment.