Skip to content

Commit f8a8cf9

Browse files
committed
Merge pull request #2424 from alphagov/add-2016-17-rates-for-register-a-birth
Add 2016/17 rates for register-a-birth
2 parents daa6fa5 + 06c42be commit f8a8cf9

10 files changed

+69
-13
lines changed

lib/data/rates/register_a_birth.yml

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
- start_date: 2015-01-01
3+
end_date: 2016-04-05
4+
register_a_birth: 105.00
5+
copy_of_birth_registration_certificate: 65.00
6+
- start_date: 2016-04-06
7+
end_date: 2017-04-05
8+
register_a_birth: 150.00
9+
copy_of_birth_registration_certificate: 50.00

lib/smart_answer/calculators/registrations_data_query.rb

+4
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,10 @@ def document_return_fees
8484
SmartAnswer::Calculators::RatesQuery.from_file('births_and_deaths_document_return_fees').rates
8585
end
8686

87+
def register_a_birth_fees
88+
RatesQuery.from_file('register_a_birth').rates
89+
end
90+
8791
def self.registration_data
8892
@embassy_data ||= YAML.load_file(Rails.root.join("lib", "data", "registrations.yml"))
8993
end
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Service | Fee
2+
-|-
3+
Register a birth | <%= format_money(reg_data_query.register_a_birth_fees.register_a_birth) %>
4+
Copy of a birth registration certificate | <%= format_money(reg_data_query.register_a_birth_fees.copy_of_birth_registration_certificate) %>

lib/smart_answer_flows/register-a-birth/outcomes/north_korea_result.govspeak.erb

+2-4
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,8 @@
3030

3131
##Cost
3232

33-
Service | Fee
34-
-|-
35-
Register a birth | £105
36-
Copy of a birth registration certificate | £65
33+
<%= render partial: 'fees.govspeak.erb',
34+
locals: { reg_data_query: reg_data_query } %>
3735

3836
You normally have to pay fees for consular services in the local currency - these are shown in the list of [consular fees](/government/organisations/foreign-commonwealth-office/series/consular-fees).
3937

lib/smart_answer_flows/register-a-birth/outcomes/oru_result.govspeak.erb

+2-4
Original file line numberDiff line numberDiff line change
@@ -201,10 +201,8 @@
201201

202202
Once you’ve paid you will be given a reference number to use on your birth registration form.
203203

204-
Service | Fee
205-
-|-
206-
Register a birth | £105
207-
Copy of a birth registration certificate | £65
204+
<%= render partial: 'fees.govspeak.erb',
205+
locals: { reg_data_query: reg_data_query } %>
208206

209207
<%= render partial: 'shared/births_and_deaths_registration/document_return_fees.govspeak.erb', locals: { document_return_fees: document_return_fees } %>
210208
<%= render partial: 'shared/births_and_deaths_registration/button.govspeak.erb', locals: { button_data: button_data } %>

test/data/marriage-abroad-files.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -146,4 +146,4 @@ lib/smart_answer/calculators/marriage_abroad_calculator.rb: ae01afa9bbaa40ef191b
146146
lib/smart_answer_flows/shared/_overseas_passports_embassies.govspeak.erb: 1d83fae34e0ee72ce1c1554bdb766d21
147147
lib/smart_answer/calculators/marriage_abroad_data_query.rb: e224243b2aa50c3c89d68515b16106f7
148148
lib/smart_answer/calculators/country_name_formatter.rb: c11e2762e225f0800e770728fb6ad474
149-
lib/smart_answer/calculators/registrations_data_query.rb: 9c45bdaf4080cef1b8326db428119bfb
149+
lib/smart_answer/calculators/registrations_data_query.rb: 8d7e4ba8b35fa0ac4db38b503ef5cf27

test/data/register-a-birth-files.yml

+5-3
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@
22
lib/smart_answer_flows/register-a-birth.rb: d2dac27c5327ea996b030b425922a99f
33
test/data/register-a-birth-questions-and-responses.yml: c59cb1d0c11f3ad29f905b632f7c58bb
44
test/data/register-a-birth-responses-and-expected-results.yml: 3ac4372034c86d8cc87665db59ff11d5
5+
lib/smart_answer_flows/register-a-birth/outcomes/_fees.govspeak.erb: a2bc6c611c6809b333ab42066a805f71
56
lib/smart_answer_flows/register-a-birth/outcomes/commonwealth_result.govspeak.erb: a7c70e3191f23f7e747cb45587e4825f
67
lib/smart_answer_flows/register-a-birth/outcomes/homeoffice_result.govspeak.erb: e07b86c2a892f42b0cab80b166af05df
78
lib/smart_answer_flows/register-a-birth/outcomes/no_birth_certificate_result.govspeak.erb: 174d68aa0d7cf3922a9e6a1867676359
89
lib/smart_answer_flows/register-a-birth/outcomes/no_embassy_result.govspeak.erb: ed56d500311fbe441649c92193f0e631
910
lib/smart_answer_flows/register-a-birth/outcomes/no_registration_result.govspeak.erb: 7b60252b078e6aec6f5759e894ce4ffb
10-
lib/smart_answer_flows/register-a-birth/outcomes/north_korea_result.govspeak.erb: 61f902aceeebe0c90fb42a998916e0b7
11-
lib/smart_answer_flows/register-a-birth/outcomes/oru_result.govspeak.erb: eeed695325359da6001774feaa070704
11+
lib/smart_answer_flows/register-a-birth/outcomes/north_korea_result.govspeak.erb: e5ca7dae52d4d1bdded7ac60e7e0525e
12+
lib/smart_answer_flows/register-a-birth/outcomes/oru_result.govspeak.erb: 8ae372372c1a70148813900ad2057aad
1213
lib/smart_answer_flows/register-a-birth/questions/childs_date_of_birth.govspeak.erb: e911daf1dc69ce85db372dc4ea3bdd50
1314
lib/smart_answer_flows/register-a-birth/questions/country_of_birth.govspeak.erb: 31c306c928e71eee86c60352f51ccf83
1415
lib/smart_answer_flows/register-a-birth/questions/have_you_adopted_the_child.govspeak.erb: 3a9d66656446a508c7232b26778dfa23
@@ -17,13 +18,14 @@ lib/smart_answer_flows/register-a-birth/questions/where_are_you_now.govspeak.erb
1718
lib/smart_answer_flows/register-a-birth/questions/which_country.govspeak.erb: 913b5637a2814cbd529affffc55b1f72
1819
lib/smart_answer_flows/register-a-birth/questions/who_has_british_nationality.govspeak.erb: 9a1a1acec4abc5a3f5199ab2eae0cd1c
1920
lib/smart_answer_flows/register-a-birth/register_a_birth.govspeak.erb: 05cf2d9426fc91f395fc524fdfdac800
21+
lib/data/rates/register_a_birth.yml: 8d678c61d06f614a67e8faa1933b0ff5
2022
lib/smart_answer_flows/shared/_overseas_passports_embassies.govspeak.erb: 1d83fae34e0ee72ce1c1554bdb766d21
2123
lib/smart_answer_flows/shared/births_and_deaths_registration/_button.govspeak.erb: bdd3818dfd2b9d6396daf6f60fd887a0
2224
lib/data/rates/births_and_deaths_document_return_fees.yml: 4ac203e9fd076c12f62b57f8d1b64ffc
2325
lib/data/translators.yml: d86f628f0b85e24ffb0dc0ec77401387
2426
lib/data/registrations.yml: 2eb5c61678f21bd9cc06af67c230279f
2527
lib/smart_answer/calculators/country_name_formatter.rb: c11e2762e225f0800e770728fb6ad474
26-
lib/smart_answer/calculators/registrations_data_query.rb: 9c45bdaf4080cef1b8326db428119bfb
28+
lib/smart_answer/calculators/registrations_data_query.rb: 8d7e4ba8b35fa0ac4db38b503ef5cf27
2729
lib/smart_answer/calculators/translator_links.rb: 079592f6c5ede06d7c6ae4e8c5553127
2830
test/fixtures/worldwide_locations.yml: 063711faceec3a4081d6d5fb386c8029
2931
test/fixtures/worldwide/afghanistan_organisations.json: 1fd89b60eb079c7b3fddcab985f37366

test/data/register-a-death-files.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ lib/smart_answer_flows/shared/births_and_deaths_registration/_button.govspeak.er
2020
lib/data/rates/births_and_deaths_document_return_fees.yml: 4ac203e9fd076c12f62b57f8d1b64ffc
2121
lib/data/translators.yml: d86f628f0b85e24ffb0dc0ec77401387
2222
test/fixtures/worldwide/italy_organisations.json: dc5feb424edeeb12835be916605caf46
23-
lib/smart_answer/calculators/registrations_data_query.rb: 9c45bdaf4080cef1b8326db428119bfb
23+
lib/smart_answer/calculators/registrations_data_query.rb: 8d7e4ba8b35fa0ac4db38b503ef5cf27
2424
lib/smart_answer/calculators/country_name_formatter.rb: c11e2762e225f0800e770728fb6ad474
2525
lib/smart_answer/calculators/translator_links.rb: 079592f6c5ede06d7c6ae4e8c5553127
2626
test/fixtures/worldwide_locations.yml: 063711faceec3a4081d6d5fb386c8029

test/unit/calculators/rates_query_test.rb

+32
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,38 @@ class RatesQueryTest < ActiveSupport::TestCase
102102
end
103103
end
104104
end
105+
106+
context 'register a birth fees' do
107+
context 'for 2015/16' do
108+
setup do
109+
@rates_query = RatesQuery.from_file('register_a_birth')
110+
@sixth_april_2015 = Date.parse('2015-04-06')
111+
end
112+
113+
should 'be £105 for registering a birth' do
114+
assert_equal 105, @rates_query.rates(@sixth_april_2015).register_a_birth
115+
end
116+
117+
should 'be £65 for a copy of the birth registration certificate' do
118+
assert_equal 65, @rates_query.rates(@sixth_april_2015).copy_of_birth_registration_certificate
119+
end
120+
end
121+
122+
context 'for 2016/17' do
123+
setup do
124+
@rates_query = RatesQuery.from_file('register_a_birth')
125+
@sixth_april_2016 = Date.parse('2016-04-06')
126+
end
127+
128+
should 'be £150 for registering a birth' do
129+
assert_equal 150, @rates_query.rates(@sixth_april_2016).register_a_birth
130+
end
131+
132+
should 'be £50 for a copy of the birth registration certificate' do
133+
assert_equal 50, @rates_query.rates(@sixth_april_2016).copy_of_birth_registration_certificate
134+
end
135+
end
136+
end
105137
end
106138
end
107139
end

test/unit/calculators/registrations_data_query_test.rb

+9
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,15 @@ class RegistrationsDataQueryTest < ActiveSupport::TestCase
6868
end
6969
end
7070
end
71+
72+
context '#register_a_birth_fees' do
73+
should 'instantiate RatesQuery using register_a_birth data' do
74+
rates_query = stub(rates: 'register-a-birth-rates')
75+
RatesQuery.stubs(:from_file).with('register_a_birth').returns(rates_query)
76+
77+
assert_equal 'register-a-birth-rates', RegistrationsDataQuery.new.register_a_birth_fees
78+
end
79+
end
7180
end
7281
end
7382
end

0 commit comments

Comments
 (0)