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

@@ -5,8 +5,8 @@ FactoryBot.define do
before(:create) do |channel_telegram|
# we are skipping some of the validation methods
channel_telegram.define_singleton_method(:ensure_valid_bot_token) { return }
channel_telegram.define_singleton_method(:setup_telegram_webhook) { return }
channel_telegram.define_singleton_method(:ensure_valid_bot_token) { nil }
channel_telegram.define_singleton_method(:setup_telegram_webhook) { nil }
end
after(:create) do |channel_telegram|

View File

@@ -41,8 +41,8 @@ FactoryBot.define do
before(:create) do |channel_whatsapp, options|
# since factory already has the required message templates, we just need to bypass it getting updated
channel_whatsapp.define_singleton_method(:sync_templates) { return } unless options.sync_templates
channel_whatsapp.define_singleton_method(:validate_provider_config) { return } unless options.validate_provider_config
channel_whatsapp.define_singleton_method(:sync_templates) { nil } unless options.sync_templates
channel_whatsapp.define_singleton_method(:validate_provider_config) { nil } unless options.validate_provider_config
if channel_whatsapp.provider == 'whatsapp_cloud'
channel_whatsapp.provider_config = channel_whatsapp.provider_config.merge({ 'api_key' => 'test_key', 'phone_number_id' => '123456789',
'business_account_id' => '123456789' })