diff options
Diffstat (limited to 'comm/calendar/test/unit/test_bug668222.js')
-rw-r--r-- | comm/calendar/test/unit/test_bug668222.js | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/comm/calendar/test/unit/test_bug668222.js b/comm/calendar/test/unit/test_bug668222.js new file mode 100644 index 0000000000..eb6e9f5d0b --- /dev/null +++ b/comm/calendar/test/unit/test_bug668222.js @@ -0,0 +1,28 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +var { XPCOMUtils } = ChromeUtils.importESModule("resource://gre/modules/XPCOMUtils.sys.mjs"); + +XPCOMUtils.defineLazyModuleGetters(this, { + CalAttendee: "resource:///modules/CalAttendee.jsm", +}); + +function run_test() { + let attendee = new CalAttendee(); + attendee.id = "mailto:somebody"; + + // Set the property and make sure its there + attendee.setProperty("SCHEDULE-AGENT", "CLIENT"); + equal(attendee.getProperty("SCHEDULE-AGENT"), "CLIENT"); + + // Reserialize the property, this has caused the property to go away + // in the past. + attendee.icalProperty = attendee.icalProperty; // eslint-disable-line no-self-assign + equal(attendee.getProperty("SCHEDULE-AGENT"), "CLIENT"); + + // Also make sure there are no promoted properties set. This does not + // technically belong to this bug, but I almost caused this error while + // writing the patch. + ok(!attendee.icalProperty.icalString.includes("RSVP")); +} |