diff --git a/spec/fixtures/forms/2021_2022.json b/spec/fixtures/forms/2021_2022.json index ec13bdabb..381f5a7b5 100644 --- a/spec/fixtures/forms/2021_2022.json +++ b/spec/fixtures/forms/2021_2022.json @@ -905,7 +905,7 @@ "hint_text": "Eligible for housing benefit or Universal Credit", "type": "numeric", "min": 0, - "step": 1, + "step": 0.01, "width": 4, "fields-to-add": [ "brent", @@ -921,7 +921,7 @@ "hint_text": "Eligible for housing benefit or Universal Credit", "type": "numeric", "min": 0, - "step": 1, + "step": 0.01, "width": 4, "fields-to-add": [ "brent", @@ -937,7 +937,7 @@ "hint_text": "Not eligible for housing benefit or Universal Credit. For example, hot water excluding water rates.", "type": "numeric", "min": 0, - "step": 1, + "step": 0.01, "width": 4, "fields-to-add": [ "brent", @@ -954,7 +954,7 @@ "type": "numeric", "min": 0, "max": 300, - "step": 1, + "step": 0.01, "width": 4, "fields-to-add": [ "brent", @@ -970,7 +970,7 @@ "hint_text": "This is the total of rent and all charges", "type": "numeric_output", "min": 0, - "step": 1, + "step": 0.01, "width": 4, "readonly": true, "requires_js": true @@ -987,7 +987,7 @@ "hint_text": "", "type": "numeric", "min": 0, - "step": "1", + "step": 1, "width": 5, "prefix": "£", "suffix": " every week" diff --git a/spec/models/form/sales/questions/savings_spec.rb b/spec/models/form/sales/questions/savings_spec.rb index 3f721d7ef..3241d5a62 100644 --- a/spec/models/form/sales/questions/savings_spec.rb +++ b/spec/models/form/sales/questions/savings_spec.rb @@ -40,7 +40,7 @@ RSpec.describe Form::Sales::Questions::Savings, type: :model do end it "has correct step" do - expect(question.step).to eq(1) + expect(question.step).to be 10 end it "has correct prefix" do diff --git a/spec/models/sales_log_spec.rb b/spec/models/sales_log_spec.rb index ca72794a5..b806ce209 100644 --- a/spec/models/sales_log_spec.rb +++ b/spec/models/sales_log_spec.rb @@ -506,9 +506,9 @@ RSpec.describe SalesLog, type: :model do let(:completed_sales_log) { create(:sales_log, :completed) } it "returns small numbers correctly formatted as currency" do - completed_sales_log.update!(savings: 4) + completed_sales_log.update!(savings: 20) - expect(completed_sales_log.field_formatted_as_currency("savings")).to eq("£4.00") + expect(completed_sales_log.field_formatted_as_currency("savings")).to eq("£20.00") end it "returns quite large numbers correctly formatted as currency" do diff --git a/spec/models/validations/shared_validations_spec.rb b/spec/models/validations/shared_validations_spec.rb index 3de553df9..b2b57f071 100644 --- a/spec/models/validations/shared_validations_spec.rb +++ b/spec/models/validations/shared_validations_spec.rb @@ -105,7 +105,7 @@ RSpec.describe Validations::SharedValidations do end context "when validating price" do - it "validates that £ prefix and , is added in the error message" do + it "validates that prefix £ and delimeter ',' is added in the error message" do sales_log.income1 = -5 shared_validator.validate_numeric_min_max(sales_log) expect(sales_log.errors["income1"])