data_sharing_agreement_not_signed:"The organisation must accept the Data Sharing Agreement before it can be selected as the owning organisation."
inactive_merged_organisation:"The owning organisation must be active on the tenancy start date. %{owning_organisation} became inactive on %{owning_organisation_merge_date} and was replaced by %{owning_absorbing_organisation}."
inactive_absorbing_organisation:"The owning organisation must be active on the tenancy start date. %{owning_organisation} became active on %{owning_organisation_available_from}."
inactive_merged_organisation_sales:"The owning organisation must be active on the sale completion date. %{owning_organisation} became inactive on %{owning_organisation_merge_date} and was replaced by %{owning_absorbing_organisation}."
inactive_absorbing_organisation_sales:"The owning organisation must be active on the sale completion date. %{owning_organisation} became active on %{owning_organisation_available_from}."
managing_organisation:
invalid:"Please select the owning organisation or managing organisation that you belong to"
data_sharing_agreement_not_signed:"The organisation must accept the Data Sharing Agreement before it can be selected as the managing organisation."
expect(record.errors["owning_organisation_id"]).toinclude(match"The owning organisation must be active on the tenancy start date. Merged org became inactive on 2 February 2023 and was replaced by Absorbing org.")
expect(record.errors["owning_organisation_id"]).toinclude(match"The owning organisation must be active on the sale completion date. Merged org became inactive on 2 February 2023 and was replaced by Absorbing org.")
end
it"allows organisation before it has been merged"do
@ -269,7 +269,7 @@ RSpec.describe Validations::Sales::SetupValidations do
expect(record.errors["owning_organisation_id"]).toinclude(match"The owning organisation must be active on the tenancy start date. Absorbing org became active on 1 February 2023.")
expect(record.errors["owning_organisation_id"]).toinclude(match"The owning organisation must be active on the sale completion date. Absorbing org became active on 1 February 2023.")
end
it"allows absorbing organisation after it has been created"do