diff --git a/spec/shared/system/documentable.rb b/spec/shared/system/documentable.rb index 062d978c0..296da2bda 100644 --- a/spec/shared/system/documentable.rb +++ b/spec/shared/system/documentable.rb @@ -134,12 +134,3 @@ shared_examples "documentable" do |documentable_factory_name, documentable_path, end end end - -def attach_document(path, success = true) - attach_file :document_attachment, path, make_visible: true - if success - expect(page).to have_css ".loading-bar.complete" - else - expect(page).to have_css ".loading-bar.errors" - end -end diff --git a/spec/shared/system/imageable.rb b/spec/shared/system/imageable.rb index 6b39c17ea..59e08af32 100644 --- a/spec/shared/system/imageable.rb +++ b/spec/shared/system/imageable.rb @@ -30,14 +30,3 @@ shared_examples "imageable" do |imageable_factory_name, imageable_path, imageabl end end end - -def attach_image(path, success = true) - image = find(".image") - image_input = image.find("input[type=file]", visible: false) - attach_file image_input[:id], path, make_visible: true - if success - expect(page).to have_css ".loading-bar.complete" - else - expect(page).to have_css ".loading-bar.errors" - end -end