test(Viewer): verify saveXML works

This commit is contained in:
Nico Rehwaldt 2016-02-11 17:20:27 +01:00
parent 8e7accbadf
commit 0ad02aa780
1 changed files with 30 additions and 0 deletions

View File

@ -297,6 +297,36 @@ describe('Viewer', function() {
}
it('should export XML', function(done) {
// given
var xml = require('../fixtures/bpmn/simple.bpmn');
createViewer(xml, function(err, warnings, viewer) {
if (err) {
return done(err);
}
// when
viewer.saveXML({ format: true }, function(err, xml) {
if (err) {
return done(err);
}
// then
expect(xml).to.contain('<?xml version="1.0" encoding="UTF-8"?>');
expect(xml).to.contain('<bpmn2:definitions');
expect(xml).to.contain(' ');
done();
});
});
});
it('should export svg', function(done) {
// given