From f4b82f1dc05081b5745a49a3b0dfa7f2bc852e3f Mon Sep 17 00:00:00 2001 From: Guo Xiang Tan Date: Thu, 21 May 2020 07:19:25 +0800 Subject: [PATCH] DEV: Fix randomly failing spec. If a user is created with an id of 999, a `upload.user_id == user_avatar.user_id` will return true. This fix increases the id of the upload to something that we will not hit in the foreseeable future. --- spec/components/guardian/user_guardian_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/components/guardian/user_guardian_spec.rb b/spec/components/guardian/user_guardian_spec.rb index b812fa9526d..10b6afc9413 100644 --- a/spec/components/guardian/user_guardian_spec.rb +++ b/spec/components/guardian/user_guardian_spec.rb @@ -25,13 +25,13 @@ describe UserGuardian do end let :already_uploaded do - u = Upload.new(user_id: 999, id: 2) + u = Upload.new(user_id: 9999, id: 2) user_avatar.custom_upload_id = u.id u end let :not_my_upload do - Upload.new(user_id: 999, id: 3) + Upload.new(user_id: 9999, id: 3) end let(:moderator_upload) do