From afbd1fec371316dc79e4e5e21d65954fe25d1b39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Sun, 20 Jun 2021 14:27:38 +0200 Subject: [PATCH] Remove unused methods to attach files in tests These methods aren't used since commits eef8ad1b7 and 2993ef87. --- spec/shared/system/documentable.rb | 9 --------- spec/shared/system/imageable.rb | 11 ----------- 2 files changed, 20 deletions(-) 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