DEV: Freeze time in time-sensitive specs (#16062)

Hopefully fixes a flake 🙂
This commit is contained in:
Jarek Radosz 2022-02-28 07:15:13 +01:00 committed by GitHub
parent e613aef419
commit c97b4d530a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)