Browse Source

Rubocop and removing testing lines

pull/764/head
Stéphane Meny 3 years ago
parent
commit
903e199f99
No known key found for this signature in database
GPG Key ID: 9D0AFEA988527923
  1. 2
      app/services/exports/case_log_export_service.rb
  2. 2
      spec/services/exports/case_log_export_service_spec.rb

2
app/services/exports/case_log_export_service.rb

@ -211,7 +211,7 @@ module Exports
attribute_hash["reghome"] = scheme.registered_under_care_act_before_type_cast
attribute_hash["schtype"] = scheme.scheme_type_before_type_cast
attribute_hash["support"] = scheme.support_type_before_type_cast
attribute_hash["units_scheme"] = scheme.locations.map{|location| location.units}.sum
attribute_hash["units_scheme"] = scheme.locations.map(&:units).sum
end
def add_location_fields!(location, attribute_hash)

2
spec/services/exports/case_log_export_service_spec.rb

@ -252,8 +252,6 @@ RSpec.describe Exports::CaseLogExportService do
let(:case_log) { FactoryBot.create(:case_log, :completed, :export, :sh, scheme: location.scheme, location:) }
it "generates an XML export file with the expected content" do
# pp case_log.form.subsections.reject{|s| s.status(case_log) == :completed}.map{|s| s.id}
pp case_log.form.get_subsection("household_situation").applicable_questions(case_log).reject{|q| q.completed?(case_log)}.map{|q| q.id}
expected_content = replace_entity_ids(case_log, export_file.read)
expect(storage_service).to receive(:write_file).with(expected_zip_filename, any_args) do |_, content|
entry = Zip::File.open_buffer(content).find_entry(expected_data_filename)

Loading…
Cancel
Save