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.39 spec/lib/onebox/engine/cloudapp_onebox_spec.rb
onebox-1.8.38 spec/lib/onebox/engine/cloudapp_onebox_spec.rb
onebox-1.8.36 spec/lib/onebox/engine/cloudapp_onebox_spec.rb
onebox-1.8.35 spec/lib/onebox/engine/cloudapp_onebox_spec.rb
onebox-1.8.34 spec/lib/onebox/engine/cloudapp_onebox_spec.rb
onebox-1.8.33 spec/lib/onebox/engine/cloudapp_onebox_spec.rb
onebox-1.8.32 spec/lib/onebox/engine/cloudapp_onebox_spec.rb
onebox-1.8.31 spec/lib/onebox/engine/cloudapp_onebox_spec.rb
onebox-1.8.30 spec/lib/onebox/engine/cloudapp_onebox_spec.rb
onebox-1.8.29 spec/lib/onebox/engine/cloudapp_onebox_spec.rb
onebox-1.8.28 spec/lib/onebox/engine/cloudapp_onebox_spec.rb
onebox-1.8.27 spec/lib/onebox/engine/cloudapp_onebox_spec.rb
onebox-1.8.26 spec/lib/onebox/engine/cloudapp_onebox_spec.rb
onebox-1.8.25 spec/lib/onebox/engine/cloudapp_onebox_spec.rb
onebox-1.8.24 spec/lib/onebox/engine/cloudapp_onebox_spec.rb
onebox-1.8.23 spec/lib/onebox/engine/cloudapp_onebox_spec.rb
onebox-1.8.22 spec/lib/onebox/engine/cloudapp_onebox_spec.rb
onebox-1.8.21 spec/lib/onebox/engine/cloudapp_onebox_spec.rb
onebox-1.8.20 spec/lib/onebox/engine/cloudapp_onebox_spec.rb
onebox-1.8.19 spec/lib/onebox/engine/cloudapp_onebox_spec.rb