chore: Update dependencies to the latest versions (#5033)

This commit is contained in:
Sojan Jose
2022-07-15 04:51:59 +02:00
committed by GitHub
parent ea1a27c7d4
commit 4187428729
122 changed files with 546 additions and 526 deletions

View File

@@ -2,7 +2,7 @@ require 'rails_helper'
describe ChatwootCaptcha do
it 'returns true if HCAPTCHA SERVER KEY is absent' do
expect(described_class.new('random_key').valid?).to eq(true)
expect(described_class.new('random_key').valid?).to be(true)
end
context 'when HCAPTCHA SERVER KEY is present' do
@@ -11,7 +11,7 @@ describe ChatwootCaptcha do
end
it 'returns false if client response is blank' do
expect(described_class.new('').valid?).to eq false
expect(described_class.new('').valid?).to be false
end
it 'returns true if client response is valid' do
@@ -19,7 +19,7 @@ describe ChatwootCaptcha do
allow(HTTParty).to receive(:post).and_return(captcha_request)
allow(captcha_request).to receive(:success?).and_return(true)
allow(captcha_request).to receive(:parsed_response).and_return({ 'success' => true })
expect(described_class.new('valid_response').valid?).to eq true
expect(described_class.new('valid_response').valid?).to be true
end
end
end

View File

@@ -3,7 +3,7 @@ require 'rails_helper'
describe ChatwootHub do
it 'generates installation identifier' do
installation_identifier = described_class.installation_identifier
expect(installation_identifier).not_to eq nil
expect(installation_identifier).not_to be_nil
expect(described_class.installation_identifier).to eq installation_identifier
end
@@ -28,7 +28,7 @@ describe ChatwootHub do
it 'returns nil when chatwoot hub is down' do
allow(RestClient).to receive(:post).and_raise(ExceptionList::REST_CLIENT_EXCEPTIONS.sample)
expect(described_class.latest_version).to eq nil
expect(described_class.latest_version).to be_nil
end
end

View File

@@ -23,7 +23,7 @@ describe GlobalConfigService do
it 'get value from env variable even if present on DB' do
with_modified_env ENABLE_ACCOUNT_SIGNUP: 'false' do
expect(InstallationConfig.find_by(name: 'ENABLE_ACCOUNT_SIGNUP')&.value).to eq nil
expect(InstallationConfig.find_by(name: 'ENABLE_ACCOUNT_SIGNUP')&.value).to be_nil
value = described_class.load('ENABLE_ACCOUNT_SIGNUP', 'true')
expect(value).to eq 'false'
end

View File

@@ -61,7 +61,7 @@ describe Integrations::Csml::ProcessorService do
let(:conversation) { create(:conversation, account: account, status: :open) }
it 'returns nil' do
expect(processor.perform).to be(nil)
expect(processor.perform).to be_nil
end
end
@@ -69,7 +69,7 @@ describe Integrations::Csml::ProcessorService do
let(:message) { create(:message, account: account, conversation: conversation, private: true) }
it 'returns nil' do
expect(processor.perform).to be(nil)
expect(processor.perform).to be_nil
end
end
@@ -77,7 +77,7 @@ describe Integrations::Csml::ProcessorService do
let(:message) { create(:message, account: account, conversation: conversation, message_type: :template) }
it 'returns nil' do
expect(processor.perform).to be(nil)
expect(processor.perform).to be_nil
end
end
@@ -100,7 +100,7 @@ describe Integrations::Csml::ProcessorService do
let(:event_name) { 'message.updated' }
it 'returns nil' do
expect(processor.perform).to be(nil)
expect(processor.perform).to be_nil
end
end
end

View File

@@ -93,7 +93,7 @@ describe Integrations::Dialogflow::ProcessorService do
let(:conversation) { create(:conversation, account: account, status: :open) }
it 'returns nil' do
expect(processor.perform).to be(nil)
expect(processor.perform).to be_nil
end
end
@@ -101,7 +101,7 @@ describe Integrations::Dialogflow::ProcessorService do
let(:message) { create(:message, account: account, conversation: conversation, private: true) }
it 'returns nil' do
expect(processor.perform).to be(nil)
expect(processor.perform).to be_nil
end
end

View File

@@ -36,7 +36,7 @@ describe Integrations::Slack::IncomingMessageBuilder do
end
it 'creates message' do
expect(hook).not_to eq nil
expect(hook).not_to be_nil
messages_count = conversation.messages.count
builder = described_class.new(message_params)
allow(builder).to receive(:sender).and_return(nil)
@@ -71,7 +71,7 @@ describe Integrations::Slack::IncomingMessageBuilder do
end
it 'saves attachment if params files present' do
expect(hook).not_to eq nil
expect(hook).not_to be_nil
messages_count = conversation.messages.count
builder = described_class.new(message_with_attachments)
allow(builder).to receive(:sender).and_return(nil)
@@ -82,7 +82,7 @@ describe Integrations::Slack::IncomingMessageBuilder do
end
it 'ignore message if it is postback of CW attachment message' do
expect(hook).not_to eq nil
expect(hook).not_to be_nil
messages_count = conversation.messages.count
message_with_attachments[:event][:text] = 'Attached File!'
builder = described_class.new(message_with_attachments)