Skip to content

Commit

Permalink
Fix terms and condition spec
Browse files Browse the repository at this point in the history
Timecop intefere with the fake terms of service, so we need to manually
accept the terms of service to make the banner disappear
  • Loading branch information
rioug committed Nov 13, 2023
1 parent 7b628a3 commit efefb1c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions spec/system/admin/enterprises/terms_and_conditions_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ def go_to_business_details
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!"
Expand Down

0 comments on commit efefb1c

Please sign in to comment.