From a5c58da48c257d2c57cdb8b8d5506f98ad044724 Mon Sep 17 00:00:00 2001 From: Karina Kwiatek Date: Thu, 17 Aug 2023 20:54:37 +0200 Subject: [PATCH] Set time explicitly --- spec/controllers/ajax/answer_controller_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/controllers/ajax/answer_controller_spec.rb b/spec/controllers/ajax/answer_controller_spec.rb index 3e42c2e7..1f1632f2 100644 --- a/spec/controllers/ajax/answer_controller_spec.rb +++ b/spec/controllers/ajax/answer_controller_spec.rb @@ -333,7 +333,7 @@ describe Ajax::AnswerController, :ajax_controller, type: :controller do it "updates the inbox caching timestamp for the user who answered" do initial_timestamp = 1.day.ago answer.user.update(inbox_updated_at: initial_timestamp) - freeze_time do + travel_to 1.day.from_now do expect { subject }.to(change { answer.user.reload.inbox_updated_at }.from(initial_timestamp).to(DateTime.now)) end end