diff --git a/spec/features/admin/enterprises/terms_and_conditions_spec.rb b/spec/features/admin/enterprises/terms_and_conditions_spec.rb index ced7c5deea..3f862403d4 100644 --- a/spec/features/admin/enterprises/terms_and_conditions_spec.rb +++ b/spec/features/admin/enterprises/terms_and_conditions_spec.rb @@ -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']")