|
|
|
@ -989,18 +989,6 @@ RSpec.describe BulkUpload::Sales::Year2024::RowParser do |
|
|
|
expect(parser.errors.where(:field_31, category: :soft_validation).first.message).to eql("You told us this person is aged 22 years and retired.") |
|
|
|
expect(parser.errors.where(:field_31, category: :soft_validation).first.message).to eql("You told us this person is aged 22 years and retired.") |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
context "when a soft validation is triggered that relates both to fields that are and are not routed to" do |
|
|
|
|
|
|
|
let(:attributes) { valid_attributes.merge({ field_101: "300000" }) } |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
it "adds errors to fields that are routed to" do |
|
|
|
|
|
|
|
expect(parser.errors.where(:field_101, category: :soft_validation)).to be_present |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
it "does not add errors to fields that are not routed to" do |
|
|
|
|
|
|
|
expect(parser.errors.where(:field_112, category: :soft_validation)).not_to be_present |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|