Add upload of Terms of Service files

Admins can upload files and view the most recent (current) one.
This commit is contained in:
Maikel Linke
2021-04-22 13:41:42 +10:00
parent ed4f61acd7
commit abe76ccf0f
4 changed files with 38 additions and 1 deletions

View File

@@ -13,5 +13,13 @@ describe "Terms of Service files" do
click_link "Terms of Service"
expect(page).to have_content "No terms of services have been uploaded yet."
end
it "can be uploaded" do
visit admin_terms_of_service_files_path
attach_file "Attachment", Rails.root.join("public/Terms-of-service.pdf")
click_button "Create Terms of service file"
expect(page).to have_link "Terms of Service"
end
end
end