Sha256: 2df07370fcda7e980775a881a710fe8bbfc1bf177e591f78bf77b8fc28d89791

Contents?: true

Size: 980 Bytes

Versions: 1

Compression:

Stored size: 980 Bytes

Contents

require "spec_helper"

describe Onebox::Engine::Revision3Onebox do
  before(:all) do
    @link = "http://revision3.com/discoverysharks/blue-sharks"
    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("Blue Shark Bites Diver's Arm")
    end

    it "returns video image" do
      expect(html).to include("discoverysharks--0029--blue-sharks--medium.thumb.jpg")
    end

    it "returns video description" do
      expect(html).to include("Blue Sharks swimming and eating in the open ocean.")
    end

    it "returns video URL" do
      expect(html).to include("https://revision3.com/player-v22668")
    end

    it "returns video embed code"

    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/revision3_onebox_spec.rb