You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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"])
it"adds an error to the `:attachment` field"doexpect(subject).not_tobe_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])# endexpect(subject.errors.full_messages).tomatch_array(["Title can't be blank","Attachment Needs to be reattached"])expect(subject.errors.attribute_names).tomatch_array([:title,:attachment])endendend
The text was updated successfully, but these errors were encountered:
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
decidim-lyon/spec/shared/proposal_form_examples.rb
Line 276 in f5ffa87
The text was updated successfully, but these errors were encountered: