Unify links to download documents in admin tables

We were using a "Download file" link in one place, while in another
place we had an additional column where the name of the document was a
link to download it.
This commit is contained in:
Javi Martín
2023-10-12 17:18:43 +02:00
parent bdb92e4161
commit 6d59a847eb
4 changed files with 14 additions and 13 deletions

View File

@@ -23,7 +23,7 @@ describe "Documents", :admin do
visit admin_site_customization_documents_path
expect(page).to have_content "There are 3 documents"
expect(page).to have_link document.title, href: url
expect(page).to have_link "Download file", href: url
end
scenario "Index (empty)" do
@@ -58,7 +58,8 @@ describe "Documents", :admin do
click_button "Upload"
expect(page).to have_content "Document uploaded successfully"
expect(page).to have_link "logo.pdf"
within("tr", text: "logo.pdf") { expect(page).to have_link "Download file" }
end
scenario "Errors on create" do