Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
  • 2 commits
  • 8 files changed
  • 0 comments
  • 1 contributor
6 app/views/partials/questions/_document_type.html.erb
@@ -3,7 +3,11 @@
3 3 <% @transaction.document_types.each do |value,label| %>
4 4 <li>
5 5 <%= label_tag "transaction_document_type_#{value}" do %>
6   - <%= radio_button_tag "transaction[document_type]", value %> <%= label %>
  6 + <%
  7 + formatted_label = label
  8 + formatted_label[0] = formatted_label[0].capitalize
  9 + %>
  10 + <%= radio_button_tag "transaction[document_type]", value %> <%= formatted_label %>
7 11 <% end %>
8 12 </li>
9 13 <% end %>
2  app/views/partials/transactions/deposit-foreign-marriage/_confirm.html.erb
... ... @@ -1 +1 @@
1   -<p>The cost to deposit <%= pluralize @calculation.document_count, "certificate" %><% if @calculation.postage? %> plus postage <% end %> is &pound;<%= format_money @calculation.total_cost %>.
  1 +<p>The cost to deposit <%= pluralize @calculation.document_count, "certificate" %><% if @calculation.postage %> plus postage<% end %> is &pound;<%= format_money @calculation.total_cost %>.
2  app/views/partials/transactions/pay-legalisation-drop-off/_confirm.html.erb
... ... @@ -1 +1 @@
1   -<p>It costs &pound;<%= @calculation.total_cost %> for <%= pluralize @calculation.document_count, "document" %> plus <%= @calculation.postage_option_label %> postage.</p>
  1 +<p>It costs &pound;<%= @calculation.total_cost %> for <%= pluralize @calculation.document_count, "document" %><% if @calculation.postage_option_label != "" %> plus <%= @calculation.postage_option_label %> postage<% end %>.</p>
2  app/views/partials/transactions/pay-register-death-abroad/_confirm.html.erb
... ... @@ -1 +1 @@
1   -<p>The cost for <%= pluralize @calculation.registration_count, "registration" %> and <%= pluralize @calculation.document_count, "certificate" %><% if @calculation.postage? %> plus postage<% end %> is &pound;<%= format_money @calculation.total_cost %>.</p>
  1 +<p>The cost for <%= pluralize @calculation.registration_count, "registration" %> and <%= pluralize @calculation.document_count, "certificate" %><% if @calculation.postage %> plus postage<% end %> is &pound;<%= format_money @calculation.total_cost %>.</p>
2  lib/transaction_calculator.rb
@@ -65,7 +65,7 @@ def pluralize_document_type_label(quantity, label)
65 65
66 66 case label
67 67 when /\Acertificate/i then label.sub(/\A([cC])ertificate/i, '\1ertificates')
68   - when "Nulla osta" then "Nulla Ostas" # pluralize thinks this is already plural
  68 + when "Nulla Osta" then "Nulla Ostas" # pluralize thinks this is already plural
69 69 else
70 70 label.pluralize(quantity)
71 71 end
4 spec/controllers/epdq_transactions_controller_spec.rb
@@ -76,7 +76,7 @@
76 76
77 77 it "should calculate the correct total cost" do
78 78 assigns(:calculation).total_cost.should == 335
79   - assigns(:calculation).item_list.should == "5 Nulla ostas, plus postage,"
  79 + assigns(:calculation).item_list.should == "5 Nulla Ostas plus postage"
80 80 end
81 81
82 82 it "is successful" do
@@ -147,7 +147,7 @@
147 147
148 148 it "should calculate the correct total cost" do
149 149 assigns(:calculation).total_cost.should == 860
150   - assigns(:calculation).item_list.should == "5 birth registrations and 5 birth certificates, plus postage,"
  150 + assigns(:calculation).item_list.should == "5 birth registrations and 5 birth certificates plus postage"
151 151 end
152 152
153 153 it "is successful" do
14 spec/features/epdq_transactions_spec.rb
@@ -23,7 +23,7 @@
23 23 within(:css, "form") do
24 24 page.should have_content("Pay for documents you need from the Foreign & Commonwealth Office (FCO) to prove you’re allowed to get married abroad.")
25 25 page.should have_unchecked_field("Certificate of no impediment")
26   - page.should have_unchecked_field("Nulla osta")
  26 + page.should have_unchecked_field("Nulla Osta")
27 27 page.should have_unchecked_field("Certificate of custom law")
28 28
29 29 page.should have_content("Each certificate costs £65.")
@@ -50,7 +50,7 @@
50 50 end
51 51
52 52 it "calculates a total" do
53   - page.should have_content("The cost for 3 Certificates of custom law, plus postage, is £205")
  53 + page.should have_content("The cost of 3 Certificates of custom law plus postage is £205")
54 54 end
55 55
56 56 it "generates an EPDQ form" do
@@ -172,7 +172,7 @@
172 172 end
173 173
174 174 it "calculates a total" do
175   - page.should have_content("The cost for 2 birth registrations and 3 birth certificates, plus postage, is £415")
  175 + page.should have_content("The cost for 2 registrations and 3 certificates is £415")
176 176 end
177 177
178 178 it "generates an EPDQ form" do
@@ -232,7 +232,7 @@
232 232 end
233 233
234 234 it "calculates a total" do
235   - page.should have_content("The cost for 5 death registrations and 1 death certificate, plus postage, is £600")
  235 + page.should have_content("The cost for 5 registrations and 1 certificate plus postage is £600")
236 236 end
237 237
238 238 it "generates an EPDQ form" do
@@ -288,7 +288,7 @@
288 288 end
289 289
290 290 it "calculates a total" do
291   - page.should have_content("The cost for 1 document, plus postage, is £45")
  291 + page.should have_content("The cost to deposit 1 certificate plus postage is £45")
292 292 end
293 293
294 294 it "generates an EPDQ form" do
@@ -348,7 +348,7 @@
348 348 end
349 349
350 350 it "calculates a total" do
351   - page.should have_content("The cost for 1 document, plus Rest of the World postage, is £55")
  351 + page.should have_content("It costs £55 for 1 document plus Rest of the World postage")
352 352 end
353 353
354 354 it "generates an EPDQ form" do
@@ -417,7 +417,7 @@
417 417 end
418 418
419 419 it "calculates a total" do
420   - page.should have_content("The cost for 5 documents is £375.")
  420 + page.should have_content("It costs £375 for 5 documents")
421 421 end
422 422
423 423 it "generates an EPDQ form" do
10 spec/lib/transaction_calculator_spec.rb
@@ -32,7 +32,7 @@
32 32 end
33 33
34 34 it "builds an item list with postage" do
35   - @calculator.calculate(:document_count => 5, :postage => "yes").item_list.should == "5 documents, plus postage,"
  35 + @calculator.calculate(:document_count => 5, :postage => "yes").item_list.should == "5 documents plus postage"
36 36 end
37 37 end
38 38
@@ -62,7 +62,7 @@
62 62 end
63 63
64 64 it "builds an item list for multiple documents, plus postage" do
65   - @calculator.calculate(:document_count => 2, :document_type => "tea-assurance-document", :postage => "yes").item_list.should == "2 Tea assurance documents, plus postage,"
  65 + @calculator.calculate(:document_count => 2, :document_type => "tea-assurance-document", :postage => "yes").item_list.should == "2 Tea assurance documents plus postage"
66 66 end
67 67
68 68 it "builds an item list for a single certificate" do
@@ -110,7 +110,7 @@
110 110 end
111 111
112 112 it "builds an item list for multiple registrations and documents, with postage" do
113   - @calculator.calculate(:registration_count => 1, :document_count => 4, :postage => "yes").item_list.should == "1 tea registration and 4 tea certificates, plus postage,"
  113 + @calculator.calculate(:registration_count => 1, :document_count => 4, :postage => "yes").item_list.should == "1 tea registration and 4 tea certificates plus postage"
114 114 end
115 115 end
116 116
@@ -144,11 +144,11 @@
144 144 end
145 145
146 146 it "builds an item list including the postage type" do
147   - @calculator.calculate(:postage_option => "horse-and-cart").item_list.should == "0 documents, plus Horse and cart postage,"
  147 + @calculator.calculate(:postage_option => "horse-and-cart").item_list.should == "0 documents plus Horse and cart postage"
148 148 end
149 149
150 150 it "builds an item list of multiple documents including the postage type" do
151   - @calculator.calculate(:postage_option => "flying-machine", :document_count => 3).item_list.should == "3 documents, plus Flying machine postage,"
  151 + @calculator.calculate(:postage_option => "flying-machine", :document_count => 3).item_list.should == "3 documents plus Flying machine postage"
152 152 end
153 153
154 154 it "raises an error if no postage option set" do

No commit comments for this range

Something went wrong with that request. Please try again.