DEV: followup to 8edd2b38cb to use existing spec (#11830)

This commit also better explains in spec why max_values might be off by one.
This commit is contained in:
Joffrey JAFFEUX
2021-01-25 12:04:27 +01:00
committed by GitHub
parent bed011feef
commit 21d6603245
2 changed files with 7 additions and 21 deletions

View File

@ -1,17 +0,0 @@
# frozen_string_literal: true
require 'rails_helper'
describe TimelineLookup do
context '.build' do
it 'keeps the last tuple in the lookup' do
tuples = [
[7173, 400], [7174, 390], [7175, 380], [7176, 370], [7177, 1]
]
expect(TimelineLookup.build(tuples, 2)).to eq([[1, 400], [4, 370], [5, 1]])
end
end
end