feat: Add Cron Jobs In Chatwoot and update installation notice (#1630)

This commit is contained in:
Sojan Jose
2021-01-11 17:34:41 +05:30
committed by GitHub
parent 160a6fc6cf
commit 346830ab1d
12 changed files with 95 additions and 1 deletions

View File

@@ -0,0 +1,14 @@
require 'rails_helper'
RSpec.describe Internal::CheckNewVersionsJob, type: :job do
subject(:job) { described_class.perform_now }
it 'updates the latest chatwoot version in redis' do
version = '1.1.1'
allow(Rails.env).to receive(:production?).and_return(true)
allow(ChatwootHub).to receive(:latest_version).and_return(version)
job
expect(ChatwootHub).to have_received(:latest_version)
expect(::Redis::Alfred.get(::Redis::Alfred::LATEST_CHATWOOT_VERSION)).to eq version
end
end