Rails.logger.info("Cannot update scheme #{original_attributes['scheme_code']} with owning_organisation: #{value}. There are lettings logs from closed collection period using this scheme")
else
scheme["owning_organisation_id"]=organisation.id
Rails.logger.info("Updating scheme #{original_attributes['scheme_code']} with owning_organisation: #{organisation.name}")
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")
expect(Rails.logger).toreceive(:info).with("Will not export log #{archived_closed_collection_lettings_log.id} as it is before the exportable date")
expect(Rails.logger).toreceive(:info).with("No changes to scheme S#{schemes[1].id}.")
@ -253,10 +268,10 @@ RSpec.describe "bulk_update" do
expect(Rails.logger).toreceive(:info).with("Updating scheme S#{schemes[0].id} with support_type: Low level")
expect(Rails.logger).toreceive(:info).with("Updating scheme S#{schemes[0].id} with intended_stay: Permanent")
expect(Rails.logger).toreceive(:info).with("Updating scheme S#{schemes[0].id} with registered_under_care_act: No")
expect(Rails.logger).toreceive(:info).with("Updating scheme S#{schemes[0].id} with owning_organisation: Different organisation")
expect(Rails.logger).toreceive(:info).with("Cannot update scheme S#{schemes[0].id} with status as it it not a permitted field")
expect(Rails.logger).toreceive(:info).with("Cannot update scheme S#{schemes[0].id} with created_at as it it not a permitted field")
expect(Rails.logger).toreceive(:info).with("Cannot update scheme S#{schemes[0].id} with active_dates as it it not a permitted field")
expect(Rails.logger).toreceive(:info).with("Cannot update scheme S#{schemes[0].id} with owning_organisation: Different organisation. There are lettings logs from closed collection period using this scheme")