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:
@@ -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
|
||||
|
||||
@@ -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) }
|
||||
|
||||
@@ -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) }
|
||||
|
||||
@@ -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) }
|
||||
|
||||
@@ -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) }
|
||||
|
||||
Reference in New Issue
Block a user