expect(record.errors["saledate"]).toinclude(match"Enter a date when the owning organisation was active. Absorbing org became active on 1 February 2023.")
end
it"allows saledate after absorbing organisation has been created"do
it"allows saledate after absorbing organisation has become available"do
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
it"allows absorbing organisation after it has become available"do
expect(record.errors["startdate"]).toinclude(match"Enter a date when the owning organisation was active. Merged org became inactive on 2 February 2023 and was replaced by Absorbing org.")
end
it"allows startate before organisation has been merged"do
it"allows startdate before organisation has been merged"do
expect(record.errors["startdate"]).toinclude(match"Enter a date when the owning organisation was active. Absorbing org became active on 1 February 2023.")
end
it"allows startate after absorbing organisation has been created"do
it"allows startdate after absorbing organisation has become available"do
expect(record.errors["startdate"]).toinclude(match"Enter a date when the managing organisation was active. Merged org became inactive on 2 February 2023 and was replaced by Absorbing org.")
end
it"allows startate before organisation has been merged"do
it"allows startdate before organisation has been merged"do
expect(record.errors["startdate"]).toinclude(match"Enter a date when the managing organisation was active. Absorbing org became active on 1 February 2023.")
end
it"allows startate after absorbing organisation has been created"do
it"allows startdate after absorbing organisation has become available"do
@ -219,7 +235,7 @@ RSpec.describe Validations::SetupValidations do
expect(record.errors["startdate"]).toinclude(match"Enter a date when the owning and managing organisation was active. Merged org became inactive on 2 February 2023 and was replaced by Absorbing org.")
end
it"allows startate before organisation has been merged"do
it"allows startdate before organisation has been merged"do
@ -237,17 +253,26 @@ RSpec.describe Validations::SetupValidations do
expect(record.errors["startdate"]).toinclude(match"Enter a date when the owning and managing organisation was active. Absorbing org became active on 1 February 2023.")
end
it"allows startate after absorbing organisation has been created"do
it"allows startdate after absorbing organisation has become available"do
@ -255,7 +280,7 @@ RSpec.describe Validations::SetupValidations do
expect(record.errors["startdate"]).toinclude(match"Enter a date when the owning and managing organisations were active. Merged org 2 and Merged org became inactive on 2 February 2023 and were replaced by Absorbing org.")
end
it"allows startate before organisations have been merged"do
it"allows startdate before organisations have been merged"do
@ -277,7 +302,7 @@ RSpec.describe Validations::SetupValidations do
expect(record.errors["startdate"]).toinclude(match"Enter a date when the owning and managing organisations were active. Merged org 2 became inactive on 2 February 2023 and was replaced by Absorbing org 2. Merged org became inactive on 2 February 2023 and was replaced by Absorbing org.")
end
it"allows startate before organisations have been merged"do
it"allows startdate before organisations have been merged"do
@ -299,13 +324,22 @@ RSpec.describe Validations::SetupValidations do
expect(record.errors["startdate"]).toinclude(match"Enter a date when the owning and managing organisations were active. Absorbing org 2 became active on 1 February 2023, and Absorbing org became active on 1 February 2023.")
end
it"allows startate after absorbing organisation has been created"do
it"allows startdate after absorbing organisation has become available"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
it"allows absorbing organisation after it has become available"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
it"allows absorbing organisation after it has become available'"do