it"moves the users from merging organisation to absorbing organisation"do
expect(Rails.logger).toreceive(:info).with("Absorbing organisation users: Danny Rojas (#{absorbing_organisation.data_protection_officers.first.email})\nMerged users from fake org: Danny Rojas (#{merging_organisation.data_protection_officers.first.email}), fake name (fake@email.com)\n")
expect(Rails.logger).toreceive(:info).with("New schemes from fake org:\n")
merge_organisations_service.call
merging_organisation_user.reload
@ -125,7 +127,7 @@ RSpec.describe Merge::MergeOrganisationsService do
expect(Rails.logger).toreceive(:info).with("Absorbing organisation users: Danny Rojas (#{absorbing_organisation.data_protection_officers.first.email})\nMerged users from fake org: Danny Rojas (#{merging_organisation.data_protection_officers.first.email}), fake name (fake@email.com)\n")
expect(Rails.logger).toreceive(:info).with("New schemes from fake org:\nScheme #{scheme.service_name} with locations: #{location.name} (#{location.postcode}), fake location (A1 1AA)\n")