-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
Description
if options[:i18n]
expect(subject.errors.full_messages).to match_array(["Title en can't be blank", "Attachment Needs to be reattached"])
expect(subject.errors.attribute_names).to match_array([:title_en, :attachment])
else
expect(subject.errors.full_messages).to match_array(["Title can't be blank", "Title is too short (under 15 characters)", "Attachment Needs to be reattached"])
expect(subject.errors.attribute_names).to match_array([:title, :attachment])
end
| # TODO: FIX THIS CODE TO WORK WITH I18N |
it "adds an error to the `:attachment` field" do
expect(subject).not_to be_valid
# TODO: FIX THIS CODE TO WORK WITH I18N
# if options[:i18n]
# expect(subject.errors.full_messages).to match_array(["Title en can't be blank", "Attachment Needs to be reattached"])
# expect(subject.errors.attribute_names).to match_array([:title_en, :attachment])
# else
# expect(subject.errors.full_messages).to match_array(["Title can't be blank", "Title is too short (under 15 characters)", "Attachment Needs to be reattached"])
# expect(subject.errors.attribute_names).to match_array([:title, :attachment])
# end
expect(subject.errors.full_messages).to match_array(["Title can't be blank", "Attachment Needs to be reattached"])
expect(subject.errors.attribute_names).to match_array([:title, :attachment])
end
end
endReactions are currently unavailable