File tree 2 files changed +8
-5
lines changed
main/kotlin/at/bitfire/ical4android/validation
test/kotlin/at/bitfire/ical4android/validation
2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -170,16 +170,17 @@ object EventValidator {
170
170
/* *
171
171
* Removes all recurrence information of exceptions of (potentially recurring) events. This is:
172
172
* `RRULE`, `RDATE` and `EXDATE`.
173
- * Note: This repair step needs to be applied after all exceptions have been found
173
+ * Note: This repair step needs to be applied after all exceptions have been found.
174
174
*
175
175
* @param exceptions exceptions of an event
176
176
*/
177
177
@VisibleForTesting
178
178
internal fun removeRecurrenceOfExceptions (exceptions : List <Event >) {
179
179
for (exception in exceptions) {
180
- exception.rRules.clear() // Drop all RRULEs for the exception
181
- exception.rDates.clear() // Drop all RDATEs for the exception
182
- exception.exDates.clear() // Drop all EXDATEs for the exception
180
+ // Drop all RRULEs, RDATEs, EXDATEs for the exception
181
+ exception.rRules.clear()
182
+ exception.rDates.clear()
183
+ exception.exDates.clear()
183
184
}
184
185
}
185
186
Original file line number Diff line number Diff line change @@ -371,7 +371,7 @@ class EventValidatorTest {
371
371
}
372
372
373
373
@Test
374
- fun testRemoveRrulesOfRruleExceptions () {
374
+ fun testRemoveRecurrencesOfRecurringWithExceptions () {
375
375
// Test manually created event
376
376
val tz = DateUtils .ical4jTimeZone(" Europe/Paris" )
377
377
val manualEvent = Event ().apply {
@@ -475,6 +475,8 @@ class EventValidatorTest {
475
475
)).first()
476
476
assertTrue(eventFromReader.rRules.size == 1 )
477
477
assertTrue(eventFromReader.exceptions.first().rRules.isEmpty())
478
+ assertTrue(eventFromReader.exceptions.first().rDates.isEmpty())
479
+ assertTrue(eventFromReader.exceptions.first().exDates.isEmpty())
478
480
}
479
481
480
482
@Test
You can’t perform that action at this time.
0 commit comments