Remove unused methods to attach files in tests

These methods aren't used since commits eef8ad1b7 and 2993ef87.
This commit is contained in:
Javi Martín
2021-06-20 14:27:38 +02:00
parent 5cf96ba03d
commit afbd1fec37
2 changed files with 0 additions and 20 deletions

View File

@@ -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

View File

@@ -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