Sha256: 934d9562701c68e7720e8a23b3a85ce8f0f8a356a28b2dd565f6747f902564b8

Contents?: true

Size: 1.07 KB

Versions: 34

Compression:

Stored size: 1.07 KB

Contents

require "spec_helper"

describe Onebox::Engine::VideoOnebox do
  it "supports ogv" do
    Onebox.preview('http://upload.wikimedia.org/wikipedia/commons/3/37/STS-134_launch_2.ogv').to_s.should match(/<video/)
  end

  it "supports mp4" do
    Onebox.preview('http://download.wavetlan.com/svv/dev/test.mp4').to_s.should match(/<video/)
  end

  it "supports mov" do
    Onebox.preview('http://download.wavetlan.com/SVV/Media/HTTP/BlackBerry.mov').to_s.should match(/<video/)
  end

  it "supports webm" do
    Onebox.preview('http://video.webmfiles.org/big-buck-bunny_trailer.webm').to_s.should match(/<video/)
  end

  it "supports URLs with query parameters" do
    Onebox.preview('http://video.webmfiles.org/big-buck-bunny_trailer.webm?foo=bar').to_s.should match(/<video/)
  end

  it "supports protocol relative URLs" do
    Onebox.preview('//video.webmfiles.org/big-buck-bunny_trailer.webm').to_s.should match(/<video/)
  end

  it "includes a fallback direct link to the video" do
    Onebox.preview('http://download.wavetlan.com/svv/dev/test.mp4').to_s.should match(/<a.*mp4/)
  end
end

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
onebox-1.4.4 spec/lib/onebox/engine/video_onebox_spec.rb
onebox-1.4.3 spec/lib/onebox/engine/video_onebox_spec.rb
onebox-1.4.2 spec/lib/onebox/engine/video_onebox_spec.rb
onebox-1.4.1 spec/lib/onebox/engine/video_onebox_spec.rb
onebox-1.4.0 spec/lib/onebox/engine/video_onebox_spec.rb
onebox-1.3.9 spec/lib/onebox/engine/video_onebox_spec.rb
onebox-1.3.8 spec/lib/onebox/engine/video_onebox_spec.rb
onebox-1.3.7 spec/lib/onebox/engine/video_onebox_spec.rb
onebox-1.3.6 spec/lib/onebox/engine/video_onebox_spec.rb
onebox-1.3.5 spec/lib/onebox/engine/video_onebox_spec.rb
onebox-1.3.4 spec/lib/onebox/engine/video_onebox_spec.rb
onebox-1.3.3 spec/lib/onebox/engine/video_onebox_spec.rb
onebox-1.3.2 spec/lib/onebox/engine/video_onebox_spec.rb
onebox-1.3.1 spec/lib/onebox/engine/video_onebox_spec.rb