@@ -1791,78 +1791,7 @@ class ReservationControllerCitizenIntegrationTest : FullApplicationTest(resetDbB
1791
1791
}
1792
1792
1793
1793
@Test
1794
- fun `citizen can override billable planned absence in non contract day placement with sick leave after threshold` () {
1795
- val area = DevCareArea ()
1796
- val daycare =
1797
- DevDaycare (areaId = area.id, enabledPilotFeatures = setOf (PilotFeature .RESERVATIONS ))
1798
- val employee = DevEmployee ()
1799
-
1800
- val adult = DevPerson ()
1801
- val child = DevPerson ()
1802
-
1803
- db.transaction { tx ->
1804
- tx.insert(area)
1805
- tx.insert(daycare)
1806
- tx.insert(employee)
1807
-
1808
- tx.insert(adult, DevPersonType .ADULT )
1809
- tx.insert(child, DevPersonType .CHILD )
1810
- tx.insertGuardian(adult.id, child.id)
1811
-
1812
- tx.insert(
1813
- DevPlacement (
1814
- type = PlacementType .PRESCHOOL_DAYCARE ,
1815
- childId = child.id,
1816
- unitId = daycare.id,
1817
- startDate = monday,
1818
- endDate = tuesday,
1819
- )
1820
- )
1821
-
1822
- tx.insert(
1823
- DevAbsence (
1824
- childId = child.id,
1825
- date = monday,
1826
- absenceType = AbsenceType .PLANNED_ABSENCE ,
1827
- modifiedBy = adult.evakaUserId(),
1828
- absenceCategory = AbsenceCategory .NONBILLABLE ,
1829
- )
1830
- )
1831
- tx.insert(
1832
- DevAbsence (
1833
- childId = child.id,
1834
- date = monday,
1835
- absenceType = AbsenceType .PLANNED_ABSENCE ,
1836
- modifiedBy = adult.evakaUserId(),
1837
- absenceCategory = AbsenceCategory .BILLABLE ,
1838
- )
1839
- )
1840
- }
1841
-
1842
- postAbsences(
1843
- adult.user(CitizenAuthLevel .WEAK ),
1844
- AbsenceRequest (
1845
- childIds = setOf (child.id),
1846
- dateRange = FiniteDateRange (monday, tuesday),
1847
- absenceType = AbsenceType .SICKLEAVE ,
1848
- ),
1849
- mockNow = afterThreshold,
1850
- )
1851
-
1852
- assertThat(
1853
- db.read { tx -> tx.getAbsencesOfChildByRange(child.id, DateRange (monday, tuesday)) }
1854
- )
1855
- .extracting({ it.date }, { it.absenceType }, { it.category })
1856
- .containsExactlyInAnyOrder(
1857
- Tuple (monday, AbsenceType .SICKLEAVE , AbsenceCategory .NONBILLABLE ),
1858
- Tuple (monday, AbsenceType .SICKLEAVE , AbsenceCategory .BILLABLE ),
1859
- Tuple (tuesday, AbsenceType .SICKLEAVE , AbsenceCategory .NONBILLABLE ),
1860
- Tuple (tuesday, AbsenceType .SICKLEAVE , AbsenceCategory .BILLABLE ),
1861
- )
1862
- }
1863
-
1864
- @Test
1865
- fun `citizen cannot override billable planned absence in contract day placement with sick leave after threshold` () {
1794
+ fun `citizen cannot override planned absence with sick leave after threshold` () {
1866
1795
val area = DevCareArea ()
1867
1796
val daycare =
1868
1797
DevDaycare (areaId = area.id, enabledPilotFeatures = setOf (PilotFeature .RESERVATIONS ))
@@ -1938,7 +1867,7 @@ class ReservationControllerCitizenIntegrationTest : FullApplicationTest(resetDbB
1938
1867
)
1939
1868
.extracting({ it.date }, { it.absenceType }, { it.category })
1940
1869
.containsExactlyInAnyOrder(
1941
- Tuple (monday, AbsenceType .SICKLEAVE , AbsenceCategory .NONBILLABLE ),
1870
+ Tuple (monday, AbsenceType .PLANNED_ABSENCE , AbsenceCategory .NONBILLABLE ),
1942
1871
Tuple (monday, AbsenceType .PLANNED_ABSENCE , AbsenceCategory .BILLABLE ),
1943
1872
Tuple (tuesday, AbsenceType .SICKLEAVE , AbsenceCategory .NONBILLABLE ),
1944
1873
Tuple (tuesday, AbsenceType .SICKLEAVE , AbsenceCategory .BILLABLE ),
0 commit comments