Sha256: dfec816ebd20a7fd2c4ed651bf561856f2722bf2d941f2680fd969d20a386776

Contents?: true

Size: 1023 Bytes

Versions: 6

Compression:

Stored size: 1023 Bytes

Contents

$:.unshift(File.dirname(__FILE__))
require 'spec_helper'

describe "flickr plugin" do
	let(:plugin) { fake_plugin(:flickr) }

	before(:all) do
		stub_request(:get, "https://www.flickr.com/services/rest/?api_key=f7e7fb8cc34e52db3e5af5e1727d0c0b&method=flickr.photos.getInfo&photo_id=5950109223")
				.to_return(status: 200, body: File.new('spec/fixtures/flickr/5950109223.flickr.photos.getInfo.xml'))
		stub_request(:get, "https://www.flickr.com/services/rest/?api_key=f7e7fb8cc34e52db3e5af5e1727d0c0b&method=flickr.photos.getSizes&photo_id=5950109223")
				.to_return(status: 200, body: File.new('spec/fixtures/flickr/5950109223.flickr.photos.getSizes.xml'))
	end

	describe '#flickr' do
		subject { plugin.flickr('5950109223', size = nil) }

		it do
			expect(subject).to eq %Q|<a href=\"https://www.flickr.com/photos/machu/5950109223/\" class=\"flickr\"><img title=\"RubyKaigi 2011\" alt=\"RubyKaigi 2011\" src=\"https://farm7.staticflickr.com/6006/5950109223_040097db92.jpg\" class=\"flickr photo\"></a>|
		end
	end
end

Version data entries

6 entries across 5 versions & 2 rubygems

Version Path
tdiary-contrib-5.0.2 spec/flicker_spec.rb
tdiary-contrib-5.0.1 spec/flicker_spec.rb
tdiary-contrib-5.0.0 spec/flicker_spec.rb
tdiary-contrib-4.2.1 spec/flicker_spec.rb
tdiary-4.2.1 vendor/bundle/ruby/2.2.0/bundler/gems/tdiary-contrib-2ab36447ae2a/spec/flicker_spec.rb
tdiary-4.2.1 vendor/bundle/ruby/2.3.0/bundler/gems/tdiary-contrib-d189eb6688f1/spec/flicker_spec.rb