Sha256: 53f8faf1ab39a0ad6dc44d1bdbbdd6e69842d1b4833862ead02d8ed1ee7092b2

Contents?: true

Size: 844 Bytes

Versions: 2

Compression:

Stored size: 844 Bytes

Contents

require "spec_helper"

describe Onebox::Engine::HuluOnebox do
  let(:link) { "http://hulu.com" }
  before do
    fake(link, response("hulu.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("The Awesomes: Pilot, Part 1")
    end

    it "returns photo" do
      expect(html).to include("http://ib3.huluim.com/video/60245466?region=US&size=600x400")
    end

    it "returns video description" do
      expect(html).to include("After Mr. Awesome decides to retire and disband The Awesomes")
    end

    it "returns video URL" do
      expect(html).to include("https://secure.hulu.com/embed/0-us7uHJgevua5TeiGwCxQ")
    end

    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/hulu_spec.rb
onebox-1.0.0 spec/lib/onebox/engine/hulu_spec.rb