diff --git a/lib/etl/extractors/csv_file_strategy.rb b/lib/etl/extractors/csv_file_strategy.rb index d50c994fc..a08b8207f 100644 --- a/lib/etl/extractors/csv_file_strategy.rb +++ b/lib/etl/extractors/csv_file_strategy.rb @@ -11,11 +11,12 @@ class CsvFileStrategy BYTE_ORDER_MARK = String.new("\xEF\xBB\xBF").force_encoding("UTF-8").freeze IMPORT_OPTIONS = { downcase_header: false, + duplicate_header_suffix: nil, force_utf8: true, remove_empty_values: false, row_sep: :auto, strip_chars_from_headers: BYTE_ORDER_MARK, - strings_as_keys: true + strings_as_keys: true, }.freeze attr_reader :errors diff --git a/spec/lib/etl/extractors/csv_file_strategy_spec.rb b/spec/lib/etl/extractors/csv_file_strategy_spec.rb index 98a55a4b9..894cb638d 100644 --- a/spec/lib/etl/extractors/csv_file_strategy_spec.rb +++ b/spec/lib/etl/extractors/csv_file_strategy_spec.rb @@ -96,7 +96,7 @@ error = subject.errors.first expect(error[:title]).to eq("CSV error") - expect(error[:detail][:messages]).to include("ERROR: duplicate headers: country,country") + expect(error[:detail][:messages]).to include('Duplicate Headers in CSV: {"country"=>2}') end end end