Sha256: 420f52c626fc5ce366630c06967dd7651c0d49f6538dd9b80cca5f0f60ded3f0
Contents?: true
Size: 586 Bytes
Versions: 22
Compression:
Stored size: 586 Bytes
Contents
require 'rails_helper' describe Kuroko2::Tick do describe '.fetch_then_update' do let(:prev_now) { Time.at(123456789) } let(:now) { Time.at(1234567890) } context 'without previous tick' do it do expect(Kuroko2::Tick.fetch_then_update(now)).to eq now expect(Kuroko2::Tick.first.at).to eq now end end context 'with previous tick' do before { create(:tick, at: prev_now) } it do expect(Kuroko2::Tick.fetch_then_update(now)).to eq prev_now expect(Kuroko2::Tick.first.at).to eq now end end end end
Version data entries
22 entries across 22 versions & 1 rubygems