Rails.logger.info("Clearing location and scheme for logs without startdate and location #{location.id}. Log IDs: #{logs_without_start_date.map(&:id).join(', ')}")
Rails.logger.info("Cleared location and scheme for logs without startdate and location #{location.id}. Log IDs: #{logs_without_start_date.map(&:id).join(', ')}")
Rails.logger.info("Clearing location and scheme for non editable logs with location #{location.id}. Log IDs: #{remaining_logs_to_export.map(&:id).join(', ')}")
Rails.logger.info("Cleared location and scheme for non editable logs with location #{location.id}. Log IDs: #{remaining_logs_to_export.map(&:id).join(', ')}")
end
end
else
else
Rails.logger.info("Cannot update location #{original_attributes['location_code']} with scheme_code: #{value}. Scheme with id #{value} is not in the database")
Rails.logger.info("Cannot update location #{original_attributes['location_code']} with scheme_code: #{value}. Scheme with id #{value} is not in the database")
Rails.logger.info("Clearing location and scheme for logs with startdate and scheme S#{scheme.id}. Log IDs: #{editable_logs_with_startdate.map(&:id).join(', ')}")
Rails.logger.info("Cleared location and scheme for logs with startdate and scheme S#{scheme.id}. Log IDs: #{editable_logs_with_startdate.map(&:id).join(', ')}")
Rails.logger.info("Clearing location and scheme for logs without startdate and scheme S#{scheme.id}. Log IDs: #{logs_without_start_date.map(&:id).join(', ')}")
Rails.logger.info("Cleared location and scheme for logs without startdate and scheme S#{scheme.id}. Log IDs: #{logs_without_start_date.map(&:id).join(', ')}")
end
end
else
else
Rails.logger.info("Cannot update scheme #{original_attributes['scheme_code']} with owning_organisation: #{value}. Organisation with name #{value} is not in the database or is not related to current organisation")
Rails.logger.info("Cannot update scheme #{original_attributes['scheme_code']} with owning_organisation: #{value}. Organisation with name #{value} is not in the database or is not related to current organisation")
@ -204,8 +204,8 @@ RSpec.describe "bulk_update" do
expect(Rails.logger).toreceive(:info).with("Updating scheme S#{schemes[0].id} with service_name: Updated test name")
expect(Rails.logger).toreceive(:info).with("Updating scheme S#{schemes[0].id} with service_name: Updated test name")
expect(Rails.logger).toreceive(:info).with("Updating scheme S#{schemes[0].id} with sensitive: No")
expect(Rails.logger).toreceive(:info).with("Updating scheme S#{schemes[0].id} with sensitive: No")
expect(Rails.logger).toreceive(:info).with("Updating scheme S#{schemes[0].id} with scheme_type: Direct Access Hostel")
expect(Rails.logger).toreceive(:info).with("Updating scheme S#{schemes[0].id} with scheme_type: Direct Access Hostel")
expect(Rails.logger).toreceive(:info).with("Cleared location and scheme for logs with startdate and scheme S#{schemes[0].id}. Log IDs: ")
expect(Rails.logger).toreceive(:info).with("Clearing location and scheme for logs with startdate and scheme S#{schemes[0].id}. Log IDs: ")
expect(Rails.logger).toreceive(:info).with("Cleared location and scheme for logs without startdate and scheme S#{schemes[0].id}. Log IDs: #{lettings_log.id}, #{lettings_log_4.id}, #{lettings_log_5.id}")
expect(Rails.logger).toreceive(:info).with("Clearing location and scheme for logs without startdate and scheme S#{schemes[0].id}. Log IDs: #{lettings_log.id}, #{lettings_log_4.id}, #{lettings_log_5.id}")
expect(Rails.logger).toreceive(:info).with("Updating scheme S#{schemes[0].id} with arrangement_type: Another registered stock owner")
expect(Rails.logger).toreceive(:info).with("Updating scheme S#{schemes[0].id} with arrangement_type: Another registered stock owner")
expect(Rails.logger).toreceive(:info).with("Updating scheme S#{schemes[0].id} with primary_client_group: People with drug problems")
expect(Rails.logger).toreceive(:info).with("Updating scheme S#{schemes[0].id} with primary_client_group: People with drug problems")
expect(Rails.logger).toreceive(:info).with("Updating scheme S#{schemes[0].id} with has_other_client_group: No")
expect(Rails.logger).toreceive(:info).with("Updating scheme S#{schemes[0].id} with has_other_client_group: No")
@ -424,9 +424,9 @@ RSpec.describe "bulk_update" do
lettings_log_5.save!(validate:false)
lettings_log_5.save!(validate:false)
expect(Rails.logger).toreceive(:info).with("Updating location #{locations[0].id} with scheme: S#{different_scheme.id}")
expect(Rails.logger).toreceive(:info).with("Updating location #{locations[0].id} with scheme: S#{different_scheme.id}")
expect(Rails.logger).toreceive(:info).with("Cleared location and scheme for logs with startdate and location #{locations[0].id}. Log IDs: #{lettings_log.id}")
expect(Rails.logger).toreceive(:info).with("Clearing location and scheme for logs with startdate and location #{locations[0].id}. Log IDs: #{lettings_log.id}")
expect(Rails.logger).toreceive(:info).with("Cleared location and scheme for logs without startdate and location #{locations[0].id}. Log IDs: ")
expect(Rails.logger).toreceive(:info).with("Clearing location and scheme for logs without startdate and location #{locations[0].id}. Log IDs: ")
expect(Rails.logger).toreceive(:info).with("Cleared location and scheme for non editable logs with location #{locations[0].id}. Log IDs: ")
expect(Rails.logger).toreceive(:info).with("Clearing location and scheme for non editable logs with location #{locations[0].id}. Log IDs: #{lettings_log_4.id}")
expect(Rails.logger).toreceive(:info).with("Updating location #{locations[0].id} with postcode: B11BB")
expect(Rails.logger).toreceive(:info).with("Updating location #{locations[0].id} with postcode: B11BB")
expect(Rails.logger).toreceive(:info).with("Updating location #{locations[0].id} with name: Updated name")
expect(Rails.logger).toreceive(:info).with("Updating location #{locations[0].id} with name: Updated name")
expect(Rails.logger).toreceive(:info).with("Updating location #{locations[0].id} with location_code: E09000033")
expect(Rails.logger).toreceive(:info).with("Updating location #{locations[0].id} with location_code: E09000033")