Commit c8fc0cf7 authored by Andi Sidwell's avatar Andi Sidwell
Browse files

Fix test not provding a filename to ICalCalendar.save[Sync]()

parent 8dbe43f8
......@@ -257,16 +257,17 @@ describe('ical-generator 0.2.x / ICalCalendar', function() {
});
it('should throw error when event invalid', function() {
var cal = ical(),
var file = path.join(__dirname, 'save.ical'),
cal = ical(),
e = cal.createEvent();
assert.throws(function() {
cal.save();
cal.save(file);
}, /`start`/);
e.start(new Date());
assert.throws(function() {
cal.save();
cal.save(file);
}, /`end`/);
});
});
......@@ -287,18 +288,19 @@ describe('ical-generator 0.2.x / ICalCalendar', function() {
});
it('should throw error when event invalid', function() {
var cal = ical(),
var file = path.join(__dirname, 'save_sync.ical'),
cal = ical(),
e = cal.createEvent();
assert.throws(function() {
/*jslint stupid: true */
cal.saveSync();
cal.saveSync(file);
}, /`start`/);
e.start(new Date());
assert.throws(function() {
/*jslint stupid: true */
cal.saveSync();
cal.saveSync(file);
}, /`end`/);
});
});
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment