Obfuscate documentable and imageable file names.
This commit is contained in:
@@ -251,7 +251,7 @@ shared_examples "documentable" do |documentable_factory_name, documentable_path,
|
||||
|
||||
attach_document("spec/fixtures/files/empty.pdf", true)
|
||||
|
||||
expect(page).to have_css("input[name='document[cached_attachment]'][value$='empty.pdf']", visible: false)
|
||||
expect(page).to have_css("input[name='document[cached_attachment]'][value$='.pdf']", visible: false)
|
||||
end
|
||||
|
||||
scenario "Should not show 'Choose document' button after valid upload", :js do
|
||||
|
||||
@@ -211,7 +211,7 @@ shared_examples "imageable" do |imageable_factory_name, imageable_path, imageabl
|
||||
|
||||
attach_image("spec/fixtures/files/clippy.jpg", true)
|
||||
|
||||
expect(page).to have_css("input[name='image[cached_attachment]'][value$='clippy.jpg']", visible: false)
|
||||
expect(page).to have_css("input[name='image[cached_attachment]'][value$='.jpg']", visible: false)
|
||||
end
|
||||
|
||||
scenario "Should not update image cached_attachment field after invalid file upload", :js do
|
||||
|
||||
@@ -131,7 +131,7 @@ shared_examples "nested documentable" do |documentable_factory_name, path, docum
|
||||
|
||||
documentable_attach_new_file(documentable_factory_name, 0, "spec/fixtures/files/empty.pdf")
|
||||
|
||||
expect(page).to have_css("input[name='#{documentable_factory_name}[documents_attributes][0][cached_attachment]'][value$='empty.pdf']", visible: false)
|
||||
expect(page).to have_css("input[name='#{documentable_factory_name}[documents_attributes][0][cached_attachment]'][value$='.pdf']", visible: false)
|
||||
end
|
||||
|
||||
scenario "Should not update document cached_attachment field after unvalid file upload", :js do
|
||||
|
||||
@@ -85,7 +85,7 @@ shared_examples "nested imageable" do |imageable_factory_name, path, imageable_p
|
||||
|
||||
imageable_attach_new_file(imageable_factory_name, "spec/fixtures/files/clippy.jpg")
|
||||
|
||||
expect(page).to have_selector("input[name='#{imageable_factory_name}[image_attributes]cached_attachment'][value$='clippy.jpg']", visible: false)
|
||||
expect(page).to have_selector("input[name='#{imageable_factory_name}[image_attributes]cached_attachment'][value$='.jpg']", visible: false)
|
||||
end
|
||||
|
||||
scenario "Should not update image cached_attachment field after unvalid file upload", :js do
|
||||
|
||||
Reference in New Issue
Block a user