Sha256: a02f7bb0736da5a9c91b82033d8ca2517fea7533d23d0b56db703c67e63d6361

Contents?: true

Size: 896 Bytes

Versions: 2

Compression:

Stored size: 896 Bytes

Contents

require "spec_helper"

describe Onebox::Engine::DailymotionOnebox do
  let(:link) { "http://dailymotion.com" }
  before do
    fake(link, response("dailymotion.response"))
  end

  it_behaves_like "engines"

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

    it "returns video title" do
      expect(html).to include("Two Door Cinema Club - Les Vielles Charrues 2013.")
    end

    it "returns video image" do
      expect(html).to include("526x297-bxE.jpg")
    end

    it "returns video description" do
      expect(html).to include("Vibrez au son de l'electro-pop des Irlandais de Two Door Cinema Club,")
    end

    it "returns video URL" do
      expect(html).to include("http://www.dailymotion.com/swf/video/x12h020?autoPlay=1")
    end

    it "returns video embed code"

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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
onebox-1.0.1 spec/lib/onebox/engine/dailymotion_spec.rb
onebox-1.0.0 spec/lib/onebox/engine/dailymotion_spec.rb