Sha256: 5c1e449d717cce0013c185070cd2c8c23f5c8b80520bcd16a90cc679065df5f3

Contents?: true

Size: 875 Bytes

Versions: 1

Compression:

Stored size: 875 Bytes

Contents

require "spec_helper"

describe Onebox::Engine::KinomapOnebox do
  before(:all) do
    @link = "http://www.kinomap.com/watch/52wjcu"
    fake(@link, response(described_class.template_name))
  end
  before(:each) { Onebox.defaults.cache.clear }

  let(:link) { @link }

  it_behaves_like "an engine"

  describe "#to_html" do
    let(:html) { described_class.new(link).to_html }

    it "returns video title" do
      expect(html).to include("Enduro Jeunes Touquet - Nicolas Letévé")
    end

    it "returns video photo" do
      expect(html).to include("52wjcu_320x240.jpg")
    end

    it "returns video description" do
      expect(html).to include("A partir du parc moto,")
    end

    it "returns video URL" do
      expect(html).to include("http://v2.kinomap.com/embed/52wjcu")
    end

    it "returns URL" do
      expect(html).to include(link)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
onebox-1.1.0 spec/lib/onebox/engine/kinomap_onebox_spec.rb