Sha256: 6eb3c3235cb4c1bb2bfdc81059b736813a77c6bdfc600babd5d77644b38864b4
Contents?: true
Size: 1.61 KB
Versions: 2
Compression:
Stored size: 1.61 KB
Contents
require 'spec_helper' describe Poms::Broadcast do let(:poms_broadcast) { Fabricate(:poms_broadcast) } # pippi langkous is a peculiar case, as it has no series, just a season let(:poms_pippi_langkous) { Fabricate(:poms_broadcast_pippi_langkous) } it 'correctly sets the series' do expect(poms_broadcast.serie_mid).to eq('POMS_S_KRO_059857') end it 'correctly sets the title' do expect(poms_broadcast.title).to eq('VRijland afl.64 & 65 (herhaling)') end it 'correctly sets the description' do description = "Li biedt Barry een baantje aan bij de uitdragerij en vraagt zich meteen af of dat wel zo slim was. Timon en Joep zien de criminele organisatie de Rijland Angels. Timon wil naar hun loods, maar is dat wel een goed idee?" expect(poms_broadcast.description).to eq(description) end it 'converts schedule events to Poms::ScheduleEvent' do poms_broadcast.schedule_events.each do |e| expect(e.class).to eq(Poms::ScheduleEvent) end end it 'correctly sets available until' do expect(poms_broadcast.available_until).to eq(Time.at(1435381968).to_datetime) end it 'sets the serie correctly when a broadcast only has a season, no series' do expect(poms_pippi_langkous.serie_mid).to eq('POW_00107959') end it 'returns the available streams' do expect(poms_broadcast.odi_streams).to eq(["adaptive", "h264_sb", "h264_bb", "h264_std", "wvc1_std", "wmv_sb", "wmv_bb"]) end it 'return the ancestors of the broadcast' do # I use to_set as the order does not matter expect(poms_broadcast.ancestor_mids.to_set).to eq(['POMS_S_KRO_059857', 'KRO_1521173'].to_set) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
poms-0.0.10 | spec/lib/poms/broadcast_spec.rb |
poms-0.0.9 | spec/lib/poms/broadcast_spec.rb |