chore: Enable the new Rubocop rules (#7122)
fixes: https://linear.app/chatwoot/issue/CW-1574/renable-the-disabled-rubocop-rules
This commit is contained in:
@@ -328,15 +328,15 @@ describe Whatsapp::IncomingMessageService do
|
||||
expect(Message.find_by(source_id: 'wamid.SDFADSf23sfasdafasdfa')).not_to be_present
|
||||
key = format(Redis::RedisKeys::MESSAGE_SOURCE_KEY, id: 'wamid.SDFADSf23sfasdafasdfa')
|
||||
|
||||
::Redis::Alfred.setex(key, true)
|
||||
expect(::Redis::Alfred.get(key)).to be_truthy
|
||||
Redis::Alfred.setex(key, true)
|
||||
expect(Redis::Alfred.get(key)).to be_truthy
|
||||
|
||||
described_class.new(inbox: whatsapp_channel.inbox, params: params).perform
|
||||
expect(whatsapp_channel.inbox.messages.count).to eq(0)
|
||||
expect(Message.find_by(source_id: 'wamid.SDFADSf23sfasdafasdfa')).not_to be_present
|
||||
|
||||
expect(::Redis::Alfred.get(key)).to be_truthy
|
||||
::Redis::Alfred.delete(key)
|
||||
expect(Redis::Alfred.get(key)).to be_truthy
|
||||
Redis::Alfred.delete(key)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -30,7 +30,7 @@ describe Whatsapp::Providers::WhatsappCloudService do
|
||||
|
||||
it 'calls message endpoints for image attachment message messages' do
|
||||
attachment = message.attachments.new(account_id: message.account_id, file_type: :image)
|
||||
attachment.file.attach(io: File.open(Rails.root.join('spec/assets/avatar.png')), filename: 'avatar.png', content_type: 'image/png')
|
||||
attachment.file.attach(io: Rails.root.join('spec/assets/avatar.png').open, filename: 'avatar.png', content_type: 'image/png')
|
||||
|
||||
stub_request(:post, 'https://graph.facebook.com/v13.0/123456789/messages')
|
||||
.with(
|
||||
@@ -47,7 +47,7 @@ describe Whatsapp::Providers::WhatsappCloudService do
|
||||
|
||||
it 'calls message endpoints for document attachment message messages' do
|
||||
attachment = message.attachments.new(account_id: message.account_id, file_type: :file)
|
||||
attachment.file.attach(io: File.open(Rails.root.join('spec/assets/sample.pdf')), filename: 'sample.pdf', content_type: 'application/pdf')
|
||||
attachment.file.attach(io: Rails.root.join('spec/assets/sample.pdf').open, filename: 'sample.pdf', content_type: 'application/pdf')
|
||||
|
||||
# ref: https://github.com/bblimke/webmock/issues/900
|
||||
# reason for Webmock::API.hash_including
|
||||
|
||||
Reference in New Issue
Block a user