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.18 spec/lib/onebox/engine/gfycat_onebox_spec.rb
onebox-1.8.17 spec/lib/onebox/engine/gfycat_onebox_spec.rb
onebox-1.8.16 spec/lib/onebox/engine/gfycat_onebox_spec.rb
onebox-1.8.15 spec/lib/onebox/engine/gfycat_onebox_spec.rb
onebox-1.8.14 spec/lib/onebox/engine/gfycat_onebox_spec.rb
onebox-1.8.13 spec/lib/onebox/engine/gfycat_onebox_spec.rb
onebox-1.8.12 spec/lib/onebox/engine/gfycat_onebox_spec.rb
onebox-1.8.11 spec/lib/onebox/engine/gfycat_onebox_spec.rb
onebox-1.8.10 spec/lib/onebox/engine/gfycat_onebox_spec.rb
onebox-1.8.9 spec/lib/onebox/engine/gfycat_onebox_spec.rb
onebox-1.8.8 spec/lib/onebox/engine/gfycat_onebox_spec.rb
onebox-1.8.7 spec/lib/onebox/engine/gfycat_onebox_spec.rb
onebox-1.8.6 spec/lib/onebox/engine/gfycat_onebox_spec.rb
onebox-1.8.5 spec/lib/onebox/engine/gfycat_onebox_spec.rb
onebox-1.8.4 spec/lib/onebox/engine/gfycat_onebox_spec.rb