Browse Source

tests

pull/1574/head
Kat 3 years ago
parent
commit
a396bb1346
  1. 3
      config/locales/en.yml
  2. 4
      spec/services/bulk_upload/sales/year2022/csv_parser_spec.rb

3
config/locales/en.yml

@ -165,6 +165,7 @@ en:
Enter a date within the %{current_start_year_short}/%{current_end_year_short} collection year, which is between %{current_start_year_long} and %{current_end_year_long}
previous_and_current_collection_year:
"Enter a date within the %{previous_start_year_short}/%{previous_end_year_short} or %{previous_end_year_short}/%{current_end_year_short} collection years, which is between %{previous_start_year_long} and %{current_end_year_long}"
year_not_two_digits: "Sale completion year must be 2 digits"
type:
percentage_bought_must_be_at_least_threshold: "The minimum increase in equity while staircasing is %{threshold}% for this shared ownership type"
@ -198,8 +199,6 @@ en:
lettype:
general_needs_mismatch: Lettings type must be a general needs type because you selected general needs when uploading the file
supported_housing_mismatch: Lettings type must be a supported housing type because you selected supported housing when uploading the file
saledate:
year_not_two_digits: "Sale completion year must be 2 digits"
property:
uprn:

4
spec/services/bulk_upload/sales/year2022/csv_parser_spec.rb

@ -3,7 +3,7 @@ require "rails_helper"
RSpec.describe BulkUpload::Sales::Year2022::CsvParser do
subject(:service) { described_class.new(path:) }
let(:path) { file_fixture("2022_23_sales_bulk_upload.csv") }
let(:path) { file_fixture("completed_2022_23_sales_bulk_upload.csv") }
context "when parsing csv with headers" do
it "returns correct offsets" do
@ -12,7 +12,7 @@ RSpec.describe BulkUpload::Sales::Year2022::CsvParser do
end
it "parses csv correctly" do
expect(service.row_parsers[0].field_7.to_i).to eq(30)
expect(service.row_parsers[0].field_7.to_i).to eq(32)
end
end

Loading…
Cancel
Save