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:
Sojan Jose
2023-05-19 14:37:10 +05:30
committed by GitHub
parent b988a01df3
commit 7ab7bac6bf
215 changed files with 609 additions and 608 deletions

View File

@@ -1,6 +1,6 @@
require 'rails_helper'
RSpec.describe Webhooks::FacebookEventsJob, type: :job do
RSpec.describe Webhooks::FacebookEventsJob do
subject(:job) { described_class.perform_later(params) }
let!(:params) { { test: 'test' } }
@@ -15,11 +15,11 @@ RSpec.describe Webhooks::FacebookEventsJob, type: :job do
it 'calls MessagePArsed and do message create' do
parser = double
creator = double
allow(::Integrations::Facebook::MessageParser).to receive(:new).and_return(parser)
allow(::Integrations::Facebook::MessageCreator).to receive(:new).and_return(creator)
allow(Integrations::Facebook::MessageParser).to receive(:new).and_return(parser)
allow(Integrations::Facebook::MessageCreator).to receive(:new).and_return(creator)
allow(creator).to receive(:perform).and_return(true)
expect(::Integrations::Facebook::MessageParser).to receive(:new).with(params)
expect(::Integrations::Facebook::MessageCreator).to receive(:new).with(parser)
expect(Integrations::Facebook::MessageParser).to receive(:new).with(params)
expect(Integrations::Facebook::MessageCreator).to receive(:new).with(parser)
expect(creator).to receive(:perform)
described_class.perform_now(params)
end

View File

@@ -1,6 +1,6 @@
require 'rails_helper'
RSpec.describe Webhooks::LineEventsJob, type: :job do
RSpec.describe Webhooks::LineEventsJob do
subject(:job) { described_class.perform_later(params: params) }
let!(:line_channel) { create(:channel_line) }

View File

@@ -1,6 +1,6 @@
require 'rails_helper'
RSpec.describe Webhooks::SmsEventsJob, type: :job do
RSpec.describe Webhooks::SmsEventsJob do
subject(:job) { described_class.perform_later(params) }
let!(:sms_channel) { create(:channel_sms) }

View File

@@ -1,6 +1,6 @@
require 'rails_helper'
RSpec.describe Webhooks::TelegramEventsJob, type: :job do
RSpec.describe Webhooks::TelegramEventsJob do
subject(:job) { described_class.perform_later(params) }
let!(:telegram_channel) { create(:channel_telegram) }

View File

@@ -1,6 +1,6 @@
require 'rails_helper'
RSpec.describe Webhooks::WhatsappEventsJob, type: :job do
RSpec.describe Webhooks::WhatsappEventsJob do
subject(:job) { described_class }
let(:channel) { create(:channel_whatsapp, provider: 'whatsapp_cloud', sync_templates: false, validate_provider_config: false) }