Sha256: 02ff5631364881a42f454d3941b7e951b30a8e8ef001afc0e3aebc701f37314a

Contents?: true

Size: 797 Bytes

Versions: 22

Compression:

Stored size: 797 Bytes

Contents

require "spec_helper"

describe Onebox::Engine::CloudAppOnebox do
  before do
    fake("https://cl.ly/0m2a2u2k440O", response("cloudapp-gif"))
    fake("https://cl.ly/0T0c2J3S373X", response("cloudapp-mp4"))
    fake("https://cl.ly/2C0E1V451J0C", response("cloudapp-jpg"))
    fake("https://cl.ly/1x1f2g253l03", response("cloudapp-others"))
  end

  it "supports gif" do
    expect(Onebox.preview('https://cl.ly/0m2a2u2k440O').to_s).to match(/<img/)
  end

  it "supports mp4" do
    expect(Onebox.preview('https://cl.ly/0T0c2J3S373X').to_s).to match(/<video/)
  end

  it "supports jpg" do
    expect(Onebox.preview('https://cl.ly/2C0E1V451J0C').to_s).to match(/<img/)
  end

  it "links to other formats" do
    expect(Onebox.preview('https://cl.ly/1x1f2g253l03').to_s).to match(/<a/)
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
onebox-1.8.18 spec/lib/onebox/engine/cloudapp_onebox_spec.rb
onebox-1.8.17 spec/lib/onebox/engine/cloudapp_onebox_spec.rb