mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-19 04:49:15 +00:00
Fix terms and condition spec
Timecop intefere with the fake terms of service, so we need to manually accept the terms of service to make the banner disappear
This commit is contained in:
committed by
Konrad
parent
94fb1397f0
commit
8e3e9ad18a
@@ -37,6 +37,9 @@ describe "Uploading Terms and Conditions PDF" do
|
||||
Timecop.freeze(run_time = time) do
|
||||
click_button "Update"
|
||||
expect(distributor.reload.terms_and_conditions_blob.created_at).to eq run_time
|
||||
# Timecop interfere with our fake TermsOfServiceFile (see spec/system_helper.rb),
|
||||
# so we accept the terms of service so that the banner doesn't hide the update button
|
||||
click_button "Accept terms of service"
|
||||
end
|
||||
expect(page).
|
||||
to have_content "Enterprise \"#{distributor.name}\" has been successfully updated!"
|
||||
|
||||
Reference in New Issue
Block a user