mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Further simplify Terms of Service spec
Since system specs are expensive, the standard workflow can be tested in one "smoke test", as one scenario. Run time reduced from 5.8s to 4.9s.
This commit is contained in:
@@ -10,7 +10,7 @@ describe "Terms of Service files" do
|
||||
|
||||
before { login_as_admin }
|
||||
|
||||
it "can be uploaded" do
|
||||
it "can be uploaded and deleted" do
|
||||
visit spree.edit_admin_general_settings_path
|
||||
click_link "Terms of Service"
|
||||
|
||||
@@ -20,15 +20,6 @@ describe "Terms of Service files" do
|
||||
click_button "Create Terms of service file"
|
||||
|
||||
expect(page).to have_link "Terms of Service"
|
||||
expect(page).to have_link "Delete file"
|
||||
end
|
||||
|
||||
it "can delete the current file" do
|
||||
attachment = File.open(Rails.root.join(test_file_path))
|
||||
file = Rack::Test::UploadedFile.new(attachment, "application/pdf")
|
||||
TermsOfServiceFile.create!(attachment: file)
|
||||
|
||||
visit admin_terms_of_service_files_path
|
||||
|
||||
accept_alert { click_link "Delete" }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user