Skip to content

Commit 9a39843

Browse files
authored
Merge pull request #3971 from alphagov/update_northern_ireland_redundancy_calculators
Add Northern Ireland redundancy pay limits
2 parents ed1af79 + be71e59 commit 9a39843

File tree

3 files changed

+38
-2
lines changed

3 files changed

+38
-2
lines changed

lib/data/rates/redundancy_pay_northern_ireland.yml

+4
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,7 @@
2727
end_date: 2019-04-05
2828
max: "15,000"
2929
rate: 530
30+
- start_date: 2019-04-06
31+
end_date: 2020-04-05
32+
max: "16,410"
33+
rate: 547

test/integration/smart_answer_flows/calculate_employee_redundancy_pay_test.rb

+17-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ class CalculateEmployeeRedundancyPayTest < ActiveSupport::TestCase
77
include FlowTestHelper
88

99
setup do
10-
Timecop.freeze("2018-08-31")
10+
Timecop.freeze("2019-08-31")
1111
setup_for_testing_flow SmartAnswer::CalculateEmployeeRedundancyPayFlow
1212
end
1313

@@ -312,6 +312,22 @@ class CalculateEmployeeRedundancyPayTest < ActiveSupport::TestCase
312312
end
313313
end
314314

315+
context "2019/2020" do
316+
should "Use the correct rates" do
317+
add_response '2019-06-01'
318+
add_response '22'
319+
add_response '7'
320+
add_response '700'
321+
assert_current_node :done
322+
assert_state_variable :rate, 525
323+
assert_state_variable :ni_rate, 547
324+
assert_state_variable :max_amount, "15,750"
325+
assert_state_variable :ni_max_amount, "16,410"
326+
assert_state_variable :statutory_redundancy_pay, "1,837.50"
327+
assert_state_variable :statutory_redundancy_pay_ni, "1,914.50"
328+
end
329+
end
330+
315331
context "answer tomorrow" do
316332
setup do
317333
add_response((Date.today + 1.day).to_s)

test/integration/smart_answer_flows/calculate_your_redundancy_pay_test.rb

+17-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ class CalculateYourRedundancyPayTest < ActiveSupport::TestCase
77
include FlowTestHelper
88

99
setup do
10-
Timecop.freeze("2018-08-31")
10+
Timecop.freeze("2019-08-31")
1111
setup_for_testing_flow SmartAnswer::CalculateYourRedundancyPayFlow
1212
end
1313

@@ -311,4 +311,20 @@ class CalculateYourRedundancyPayTest < ActiveSupport::TestCase
311311
assert_state_variable :statutory_redundancy_pay_ni, "1,855"
312312
end
313313
end
314+
315+
context "2019/2020" do
316+
should "Use the correct rates" do
317+
add_response '2019-05-01'
318+
add_response '22'
319+
add_response '7'
320+
add_response '700'
321+
assert_current_node :done
322+
assert_state_variable :rate, 525
323+
assert_state_variable :ni_rate, 547
324+
assert_state_variable :max_amount, "15,750"
325+
assert_state_variable :ni_max_amount, "16,410"
326+
assert_state_variable :statutory_redundancy_pay, "1,837.50"
327+
assert_state_variable :statutory_redundancy_pay_ni, "1,914.50"
328+
end
329+
end
314330
end

0 commit comments

Comments
 (0)