Sha256: a5ebea3859725c17dd79b92bd5776bef1e98bad21edfa71dad5d5b2b6dbf9636

Contents?: true

Size: 1019 Bytes

Versions: 35

Compression:

Stored size: 1019 Bytes

Contents

require "spec_helper"

describe Onebox::Engine::GfycatOnebox do
  let(:link) { "https://gfycat.com/AmusingPoshCleanerwrasse" }
  let(:api_link) { "https://gfycat.com/cajax/get/AmusingPoshCleanerwrasse" }
  let(:html) { described_class.new(link).to_html }
  let(:placeholder_html) { described_class.new(link).placeholder_html }

  before do
    fake(api_link, response("gfycat"))
  end

  it "has the title" do
    expect(html).to include("AmusingPoshCleanerwrasse")
    expect(placeholder_html).to include("AmusingPoshCleanerwrasse")
  end

  it "has the link" do
    expect(html).to include(link)
    expect(placeholder_html).to include(link)
  end

  it "has the poster" do
    expect(html).to include("https://thumbs.gfycat.com/AmusingPoshCleanerwrasse-poster.jpg")
  end

  it "has the webm video" do
    expect(html).to include("https://fat.gfycat.com/AmusingPoshCleanerwrasse.webm")
  end

  it "has the mp4 video" do
    expect(html).to include("https://giant.gfycat.com/AmusingPoshCleanerwrasse.mp4")
  end
end

Version data entries

35 entries across 35 versions & 1 rubygems

Version Path
onebox-1.8.39 spec/lib/onebox/engine/gfycat_onebox_spec.rb
onebox-1.8.38 spec/lib/onebox/engine/gfycat_onebox_spec.rb
onebox-1.8.36 spec/lib/onebox/engine/gfycat_onebox_spec.rb
onebox-1.8.35 spec/lib/onebox/engine/gfycat_onebox_spec.rb
onebox-1.8.34 spec/lib/onebox/engine/gfycat_onebox_spec.rb
onebox-1.8.33 spec/lib/onebox/engine/gfycat_onebox_spec.rb
onebox-1.8.32 spec/lib/onebox/engine/gfycat_onebox_spec.rb
onebox-1.8.31 spec/lib/onebox/engine/gfycat_onebox_spec.rb
onebox-1.8.30 spec/lib/onebox/engine/gfycat_onebox_spec.rb
onebox-1.8.29 spec/lib/onebox/engine/gfycat_onebox_spec.rb
onebox-1.8.28 spec/lib/onebox/engine/gfycat_onebox_spec.rb
onebox-1.8.27 spec/lib/onebox/engine/gfycat_onebox_spec.rb
onebox-1.8.26 spec/lib/onebox/engine/gfycat_onebox_spec.rb
onebox-1.8.25 spec/lib/onebox/engine/gfycat_onebox_spec.rb
onebox-1.8.24 spec/lib/onebox/engine/gfycat_onebox_spec.rb
onebox-1.8.23 spec/lib/onebox/engine/gfycat_onebox_spec.rb
onebox-1.8.22 spec/lib/onebox/engine/gfycat_onebox_spec.rb
onebox-1.8.21 spec/lib/onebox/engine/gfycat_onebox_spec.rb
onebox-1.8.20 spec/lib/onebox/engine/gfycat_onebox_spec.rb
onebox-1.8.19 spec/lib/onebox/engine/gfycat_onebox_spec.rb