Sha256: b2ae1e3402e95616e383fdff80afcd89696b2bfda349608c37eb40258651fa27

Contents?: true

Size: 801 Bytes

Versions: 1

Compression:

Stored size: 801 Bytes

Contents

require "spec_helper"

describe Onebox::Engine::YfrogOnebox do
  before(:each) { Onebox.defaults.cache.clear }
  before(:all) do
    @link = "http://twitter.yfrog.com/h0jjdobj?sa=0"
    fake(@link, response(described_class.template_name))
  end

  let(:link) { @link }

  it_behaves_like "an engine"

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

    it "returns photo title" do
      expect(html).to include("Celebrating @questlove Cook4Quest w/WyattCenac")
    end

    it "returns photo" do
      expect(html).to include("jjdob.jpg")
    end

    it "returns photo description" do
      expect(html).to include("Click on the photo to comment, share or view other great photos")
    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/yfrog_onebox_spec.rb