mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-04-04 07:09:14 +00:00
Verify terms and conditions updated_at timestamp is touched every time the file name changes.
We will need this to check if user already accepted the terms and conditions of this enterprise.
This commit is contained in:
@@ -43,7 +43,11 @@ feature "Uploading Terms and Conditions PDF" do
|
||||
|
||||
# Add PDF
|
||||
attach_file "enterprise[terms_and_conditions]", white_pdf_file_name
|
||||
click_button "Update"
|
||||
|
||||
Timecop.freeze(run_time = Time.zone.local(2002, 4, 13, 0, 0, 0)) do
|
||||
click_button "Update"
|
||||
expect(distributor.reload.terms_and_conditions_updated_at).to eq run_time
|
||||
end
|
||||
expect(page).
|
||||
to have_content("Enterprise \"#{distributor.name}\" has been successfully updated!")
|
||||
|
||||
@@ -55,6 +59,7 @@ feature "Uploading Terms and Conditions PDF" do
|
||||
click_button "Update"
|
||||
expect(page).
|
||||
to have_content("Enterprise \"#{distributor.name}\" has been successfully updated!")
|
||||
expect(distributor.reload.terms_and_conditions_updated_at).to_not eq run_time
|
||||
|
||||
go_to_business_details
|
||||
expect(page).to have_selector("a[href*='logo-black.pdf']")
|
||||
|
||||
Reference in New Issue
Block a user