From c97b4d530ad77940cb2a4feadfb1065da383d1d5 Mon Sep 17 00:00:00 2001 From: Jarek Radosz Date: Mon, 28 Feb 2022 07:15:13 +0100 Subject: [PATCH] DEV: Freeze time in time-sensitive specs (#16062) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Hopefully fixes a flake 🙂 --- spec/requests/users_controller_spec.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spec/requests/users_controller_spec.rb b/spec/requests/users_controller_spec.rb index 2ca1107f5d6..88ad68b13d5 100644 --- a/spec/requests/users_controller_spec.rb +++ b/spec/requests/users_controller_spec.rb @@ -5125,6 +5125,7 @@ describe UsersController do end it 'works for logged in user' do + freeze_time sign_in(user1) delete "/u/recent-searches.json" @@ -5141,6 +5142,7 @@ describe UsersController do end it 'works for logged in user' do + freeze_time sign_in(user1) SiteSetting.log_search_queries = true user1.user_option.update!(oldest_search_log_date: nil)