[CSV Export] Test with specified filename

This commit is contained in:
Victor Woeltjen 2016-02-05 14:08:47 -08:00
parent c4d5643ea7
commit c07dc0ea8b

View File

@ -119,6 +119,25 @@ define(
});
});
describe("#exportCSV(rows, options.filename)", function () {
var testFilename;
beforeEach(function () {
testFilename = "some-test-filename.csv";
exportService
.exportCSV(testRows, { filename: testFilename });
waitsFor(finishedReadingCSV);
});
it("saves a file with the specified name", function () {
expect(mockSaveAs).toHaveBeenCalledWith(
jasmine.any(Blob),
testFilename
);
});
});
});
}