Sha256: fc6f7c83188a8bfcc644fcf1e4aeea47a4ff690d00a5b725649a3969f03b178e

Contents?: true

Size: 773 Bytes

Versions: 1

Compression:

Stored size: 773 Bytes

Contents

require "spec_helper"

describe Onebox::Engine::FlickrOnebox do
  before(:all) do
    @link = "http://flickr.com"
    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 photo title" do
      expect(html).to include("Los Angeles View 2011")
    end

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

    it "returns photo description" do
      expect(html).to include("The view from the Griffith Observatory, Los Angeles; July 2011")
    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/flickr_onebox_spec.rb