From 355b54654dbcdf3e2f43d56842eb282a1d31b449 Mon Sep 17 00:00:00 2001 From: Ryan Lue Date: Mon, 17 Feb 2020 20:04:20 +0800 Subject: [PATCH] Follow up: Fix CI failure introduced in 0b8b6148b The previous commit introduced a CI failure which was caused by a test depending on the execution time. The Twitter channel implementation ignores tweets older than 15 days. Therefore we need to travel to the time when the VCR snapshot was recorded to fix it. --- spec/models/channel_spec.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/spec/models/channel_spec.rb b/spec/models/channel_spec.rb index 0ebb9d138..404007384 100644 --- a/spec/models/channel_spec.rb +++ b/spec/models/channel_spec.rb @@ -6,6 +6,9 @@ RSpec.describe Channel do context 'with valid token' do subject(:twitter_channel) { create(:twitter_channel) } + # travel back in time when VCR was recorded + before { travel_to '2020-02-06 13:37 +0100' } + it 'returns true' do expect(twitter_channel.fetch(true)).to be(true) end