|
|
|
@ -499,23 +499,6 @@ RSpec.describe Validations::HouseholdValidations do
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
describe "referral validations" do |
|
|
|
|
context "when type of tenancy is not secure" do |
|
|
|
|
it "cannot be not internal transfer" do |
|
|
|
|
record.tenancy = 3 |
|
|
|
|
record.referral = 3 |
|
|
|
|
household_validator.validate_referral(record) |
|
|
|
|
expect(record.errors["referral"]) |
|
|
|
|
.to include(match I18n.t("validations.household.referral.secure_tenancy")) |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
it "can be internal transfer" do |
|
|
|
|
record.tenancy = 3 |
|
|
|
|
record.referral = 1 |
|
|
|
|
household_validator.validate_referral(record) |
|
|
|
|
expect(record.errors["referral"]).to be_empty |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
context "when homelessness is assessed" do |
|
|
|
|
it "cannot be internal transfer" do |
|
|
|
|
record.homeless = 11 |
|
|
|
|