浏览代码

Use strings instead of numeric literals and remove `rubocop:disable` in cache spec (#27742)

Matt Jankowski 1 年之前
父节点
当前提交
a688a9ed20
共有 1 个文件被更改,包括 3 次插入5 次删除
  1. 3 5
      spec/requests/cache_spec.rb

+ 3 - 5
spec/requests/cache_spec.rb

@@ -171,12 +171,10 @@ describe 'Caching behavior' do
   let(:user)  { Fabricate(:user, role: UserRole.find_by(name: 'Moderator')) }
 
   before do
-    # rubocop:disable Style/NumericLiterals
-    status = Fabricate(:status, account: alice, id: 110224538612341312)
-    Fabricate(:status, account: alice, id: 110224538643211312, visibility: :private)
+    status = Fabricate(:status, account: alice, id: '110224538612341312')
+    Fabricate(:status, account: alice, id: '110224538643211312', visibility: :private)
     Fabricate(:invite, code: 'abcdef')
-    Fabricate(:poll, status: status, account: alice, id: 12345)
-    # rubocop:enable Style/NumericLiterals
+    Fabricate(:poll, status: status, account: alice, id: '12345')
 
     user.account.follow!(alice)
   end