Avoid date changes during residence tests.

As it happened with results (commit 4a559ed), these tests failed if
`Date.current` changes between the moment records are created and the
moment the rest of the test is executed.
This commit is contained in:
Javier Martín
2018-07-09 00:04:12 +02:00
parent 0cf799add6
commit 735eab8e71

View File

@@ -3,6 +3,14 @@ require 'rails_helper'
feature 'Residence' do
let(:officer) { create(:poll_officer) }
background do
travel_to Time.now # TODO: use `freeze_time` after migrating to Rails 5.
end
after do
travel_back
end
feature "Officers without assignments" do
scenario "Can not access residence verification" do