@@ -10,7 +10,7 @@ class FilingPersistenceSpec extends ActorSpec {
10
10
11
11
val filingsActor = createFilings(" 12345" , system)
12
12
13
- val sample1 = Filing (" 2016" , " 12345" , Completed , filingRequired = true , 1483287071000L , 1514736671000L )
13
+ val sample1 = Filing (" 2016" , " 12345" , Cancelled , filingRequired = true , 1483287071000L , 1514736671000L )
14
14
val sample2 = Filing (" 2017" , " 12345" , NotStarted , filingRequired = true , 0L , 0L )
15
15
16
16
val probe = TestProbe ()
@@ -38,8 +38,8 @@ class FilingPersistenceSpec extends ActorSpec {
38
38
39
39
" UpdateFilingStatus" must {
40
40
" update status of filing for given period" in {
41
- val expected = sample1.copy(status = Cancelled )
42
- probe.send(filingsActor, UpdateFilingStatus (" 2016" , Cancelled ))
41
+ val expected = sample1.copy(status = NotStarted )
42
+ probe.send(filingsActor, UpdateFilingStatus (" 2016" , NotStarted ))
43
43
probe.expectMsg(Some (expected))
44
44
probe.send(filingsActor, GetFilingByPeriod (" 2016" ))
45
45
probe.expectMsg(expected)
@@ -62,6 +62,10 @@ class FilingPersistenceSpec extends ActorSpec {
62
62
comp.start mustBe startTime
63
63
comp.end must be > 0L
64
64
}
65
+ " not update if filing status is already 'Completed'" in {
66
+ probe.send(filingsActor, UpdateFilingStatus (" 2017" , InProgress ))
67
+ probe.expectMsg(None )
68
+ }
65
69
}
66
70
67
71
}
0 commit comments