From 3bb244be79e83f579ee01de6ffff275799e27d49 Mon Sep 17 00:00:00 2001 From: angus Date: Fri, 12 Mar 2021 21:12:26 +1100 Subject: [PATCH] Add .jpeg to list of default upload extensions --- lib/custom_wizard/field.rb | 2 +- spec/fixtures/wizard.json | 2 +- spec/serializers/custom_wizard/wizard_field_serializer_spec.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/custom_wizard/field.rb b/lib/custom_wizard/field.rb index aa53c8a7..1ddbcd3b 100644 --- a/lib/custom_wizard/field.rb +++ b/lib/custom_wizard/field.rb @@ -36,7 +36,7 @@ class CustomWizard::Field min_length: nil }, upload: { - file_types: '.jpg,.png' + file_types: '.jpg,.jpeg,.png' }, dropdown: { prefill: nil, diff --git a/spec/fixtures/wizard.json b/spec/fixtures/wizard.json index 9b91d768..3718b154 100644 --- a/spec/fixtures/wizard.json +++ b/spec/fixtures/wizard.json @@ -90,7 +90,7 @@ "id": "step_2_field_7", "label": "Upload", "type": "upload", - "file_types": ".jpg,.png" + "file_types": ".jpg,.jpeg,.png" } ], "description": "

Because I couldn’t think of another name for this step \":slight_smile:\"

" diff --git a/spec/serializers/custom_wizard/wizard_field_serializer_spec.rb b/spec/serializers/custom_wizard/wizard_field_serializer_spec.rb index 0fd7c9ec..944947e6 100644 --- a/spec/serializers/custom_wizard/wizard_field_serializer_spec.rb +++ b/spec/serializers/custom_wizard/wizard_field_serializer_spec.rb @@ -33,6 +33,6 @@ describe CustomWizard::FieldSerializer do ).as_json expect(json_array[0][:format]).to eq("YYYY-MM-DD") expect(json_array[3][:number]).to eq(4) - expect(json_array[6][:file_types]).to eq(".jpg,.png") + expect(json_array[6][:file_types]).to eq(".jpg,.jpeg,.png") end end