mirror of https://github.com/tasks/tasks
Don't set repeat count to 0
parent
fe87eac962
commit
32eed65f04
@ -0,0 +1,22 @@
|
|||||||
|
package org.tasks.repeats
|
||||||
|
|
||||||
|
import junit.framework.TestCase.assertEquals
|
||||||
|
import org.junit.Test
|
||||||
|
|
||||||
|
class RecurrenceUtilsTest {
|
||||||
|
@Test
|
||||||
|
fun shouldRemoveZeroCount() {
|
||||||
|
assertEquals(
|
||||||
|
"FREQ=WEEKLY;INTERVAL=1;BYDAY=FR",
|
||||||
|
RecurrenceUtils.newRecur("FREQ=WEEKLY;COUNT=0;INTERVAL=1;BYDAY=FR").toString()
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
fun shouldRemoveNegativeCount() {
|
||||||
|
assertEquals(
|
||||||
|
"FREQ=WEEKLY;INTERVAL=1;BYDAY=FR",
|
||||||
|
RecurrenceUtils.newRecur("FREQ=WEEKLY;COUNT=-1;INTERVAL=1;BYDAY=FR").toString()
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue