Browse Source

CLDC-4086: Fix tests

CLDC-4046-remove-forcing-on-Q84
Samuel Young 3 days ago
parent
commit
27c0ab8dee
  1. 8
      spec/models/validations/household_validations_spec.rb

8
spec/models/validations/household_validations_spec.rb

@ -116,17 +116,17 @@ RSpec.describe Validations::HouseholdValidations do
end
context "when referral is not internal transfer" do
it "cannot be permanently decanted from another property owned by this landlord" do
it "can be permanently decanted from another property owned by this landlord" do
record.reason = 1
record.referral_type = 1
record.referral = 2
household_validator.validate_reason_for_leaving_last_settled_home(record)
expect(record.errors["reason"])
.to include(match(I18n.t("validations.lettings.household.reason.leaving_last_settled_home.not_internal_transfer")))
.to be_empty
expect(record.errors["referral"])
.to include(match(I18n.t("validations.lettings.household.referral.leaving_last_settled_home.reason_permanently_decanted")))
.to be_empty
expect(record.errors["referral_type"])
.to include(match(I18n.t("validations.lettings.household.referral_type.leaving_last_settled_home.reason_permanently_decanted")))
.to be_empty
end
end

Loading…
Cancel
Save