Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/glacials/splits-io. a speedrunning data store and analysis engine splits.io
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394require 'rails_helper'
RSpec.describe 'runs/_split_table' do let(:run) do r = FactoryBot.create(:livesplit16_gametime_run) r.parse_into_db r.reload r end
context 'with realtime timing' do it 'renders the split table' do render( partial: 'runs/split_table', locals: { run: run, compare_runs: [], short: run.short?(Run::REAL), timing: Run::REAL } )
expect(view).to render_template('runs/_split_table') end
context 'with a comparison run' do it 'renders the split table' do render( partial: 'runs/split_table', locals: { run: run, compare_runs: [run], short: run.short?(Run::REAL), timing: Run::REAL } )
expect(view).to render_template('runs/_split_table') end end
context 'with a comparison run with segment groups' do it 'renders the split table' do segment_group_run = FactoryBot.create(:subsplits_with_titles_run) segment_group_run.parse_into_db segment_group_run.reload
render( partial: 'runs/split_table', locals: { run: segment_group_run, compare_runs: [segment_group_run], short: segment_group_run.short?(Run::REAL), timing: Run::REAL } )
expect(view).to render_template('runs/_split_table') end end end
context 'with gametime timing' do it 'renders the split table' do render( partial: 'runs/split_table', locals: { run: run, compare_runs: [], timing: Run::GAME } )
expect(view).to render_template('runs/_split_table') end
context 'with a comparison run' do it 'renders the split table' do render( partial: 'runs/split_table', locals: { run: run, compare_runs: [run], short: run.short?(Run::GAME), timing: Run::GAME } )
expect(view).to render_template('runs/_split_table') end end endend