@@ -54,68 +54,6 @@ describe('View Bill presenter', () => {
54
54
} )
55
55
} )
56
56
57
- describe ( 'the "billRunType" property' , ( ) => {
58
- describe ( 'when the bill run is annual' , ( ) => {
59
- it ( 'returns Annual' , ( ) => {
60
- const result = ViewBillPresenter . go ( bill , billingAccount )
61
-
62
- expect ( result . billRunType ) . to . equal ( 'Annual' )
63
- } )
64
- } )
65
-
66
- describe ( 'when the bill run is supplementary' , ( ) => {
67
- beforeEach ( ( ) => {
68
- bill . billRun . batchType = 'supplementary'
69
- } )
70
-
71
- it ( 'returns Supplementary' , ( ) => {
72
- const result = ViewBillPresenter . go ( bill , billingAccount )
73
-
74
- expect ( result . billRunType ) . to . equal ( 'Supplementary' )
75
- } )
76
- } )
77
-
78
- describe ( 'when the bill run is two_part_tariff' , ( ) => {
79
- beforeEach ( ( ) => {
80
- bill . billRun . batchType = 'two_part_tariff'
81
- } )
82
-
83
- describe ( 'and the scheme is sroc' , ( ) => {
84
- it ( 'returns Supplementary' , ( ) => {
85
- const result = ViewBillPresenter . go ( bill , billingAccount )
86
-
87
- expect ( result . billRunType ) . to . equal ( 'Two-part tariff' )
88
- } )
89
- } )
90
-
91
- describe ( 'and the scheme is alcs' , ( ) => {
92
- beforeEach ( ( ) => {
93
- bill . billRun . scheme = 'alcs'
94
- } )
95
-
96
- describe ( 'and it is not summer only' , ( ) => {
97
- it ( 'returns Supplementary' , ( ) => {
98
- const result = ViewBillPresenter . go ( bill , billingAccount )
99
-
100
- expect ( result . billRunType ) . to . equal ( 'Two-part tariff winter and all year' )
101
- } )
102
- } )
103
-
104
- describe ( 'and it is for summer only' , ( ) => {
105
- beforeEach ( ( ) => {
106
- bill . billRun . summer = true
107
- } )
108
-
109
- it ( 'returns Supplementary' , ( ) => {
110
- const result = ViewBillPresenter . go ( bill , billingAccount )
111
-
112
- expect ( result . billRunType ) . to . equal ( 'Two-part tariff summer' )
113
- } )
114
- } )
115
- } )
116
- } )
117
- } )
118
-
119
57
describe ( 'the "billTotal" property' , ( ) => {
120
58
describe ( 'when the bill is a debit' , ( ) => {
121
59
it ( 'returns just the bill total formatted as money' , ( ) => {
@@ -138,28 +76,6 @@ describe('View Bill presenter', () => {
138
76
} )
139
77
} )
140
78
141
- describe ( 'the "chargeScheme" property' , ( ) => {
142
- describe ( 'when the bill run is sroc' , ( ) => {
143
- it ( 'returns Current' , ( ) => {
144
- const result = ViewBillPresenter . go ( bill , billingAccount )
145
-
146
- expect ( result . chargeScheme ) . to . equal ( 'Current' )
147
- } )
148
- } )
149
-
150
- describe ( 'when the bill run is alcs' , ( ) => {
151
- beforeEach ( ( ) => {
152
- bill . billRun . scheme = 'alcs'
153
- } )
154
-
155
- it ( 'returns Old' , ( ) => {
156
- const result = ViewBillPresenter . go ( bill , billingAccount )
157
-
158
- expect ( result . chargeScheme ) . to . equal ( 'Old' )
159
- } )
160
- } )
161
- } )
162
-
163
79
describe ( 'the "creditsTotal" property' , ( ) => {
164
80
describe ( 'when the bill run was created in WRLS' , ( ) => {
165
81
it ( 'returns the "creditNoteValue" of the bill (£0.00)' , ( ) => {
@@ -277,22 +193,6 @@ describe('View Bill presenter', () => {
277
193
} )
278
194
} )
279
195
} )
280
-
281
- describe ( 'the "financialYear" property' , ( ) => {
282
- it ( 'returns the bill run start and end financial year' , ( ) => {
283
- const result = ViewBillPresenter . go ( bill , billingAccount )
284
-
285
- expect ( result . financialYear ) . to . equal ( '2022 to 2023' )
286
- } )
287
- } )
288
-
289
- describe ( 'the "region" property' , ( ) => {
290
- it ( "returns the bill run's region display name in title case" , ( ) => {
291
- const result = ViewBillPresenter . go ( bill , billingAccount )
292
-
293
- expect ( result . region ) . to . equal ( 'South West' )
294
- } )
295
- } )
296
196
} )
297
197
} )
298
198
0 commit comments