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 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}."
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."
inactive_merged_organisation:"The managing organisation must be active on the tenancy start date. %{managing_organisation} became inactive on %{managing_organisation_merge_date} and was replaced by %{managing_absorbing_organisation}."
inactive_absorbing_organisation:"The managing organisation must be active on the tenancy start date. %{managing_organisation} became active on %{managing_organisation_available_from}."
created_by:
invalid:"Please select the owning organisation or managing organisation that you belong to"
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.")
end
it"allows organisation before it has been merged"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.")
end
it"allows absorbing organisation after it has been created"do
expect(record.errors["managing_organisation_id"]).toinclude(match"The managing organisation must be active on the tenancy start 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
expect(record.errors["managing_organisation_id"]).toinclude(match"The managing organisation must be active on the tenancy start date. Absorbing org became active on 1 February 2023.")
end
it"allows absorbing organisation after it has been created"do