Sha256: 50cf0d408af46840384312126b1504dce955dbad8601f31908b9de242ecea35d

Contents?: true

Size: 1.03 KB

Versions: 34

Compression:

Stored size: 1.03 KB

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\" height=\"375\" width=\"500\"></a>|
		end
	end
end

Version data entries

34 entries across 29 versions & 2 rubygems

Version Path
tdiary-contrib-5.3.0 spec/flicker_spec.rb
tdiary-contrib-5.2.4 spec/flicker_spec.rb
tdiary-contrib-5.2.3 spec/flicker_spec.rb
tdiary-contrib-5.2.2 spec/flicker_spec.rb
tdiary-contrib-5.2.1 spec/flicker_spec.rb
tdiary-contrib-5.2.0 spec/flicker_spec.rb
tdiary-contrib-5.1.7 spec/flicker_spec.rb
tdiary-contrib-5.1.6 spec/flicker_spec.rb
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/tdiary-5.1.5/vendor/bundle/ruby/3.0.0/gems/tdiary-contrib-5.1.4/spec/flicker_spec.rb
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/bundler/gems/tdiary-contrib-d1e41204db13/spec/flicker_spec.rb
tdiary-contrib-5.1.5 spec/flicker_spec.rb
tdiary-5.1.5 vendor/bundle/ruby/3.0.0/gems/tdiary-contrib-5.1.4/spec/flicker_spec.rb
tdiary-contrib-5.1.4 spec/flicker_spec.rb
tdiary-contrib-5.1.3 spec/flicker_spec.rb
tdiary-contrib-5.1.2 spec/flicker_spec.rb
tdiary-contrib-5.1.1 spec/flicker_spec.rb
tdiary-contrib-5.1.0 spec/flicker_spec.rb
tdiary-contrib-5.0.13 spec/flicker_spec.rb
tdiary-contrib-5.0.12 spec/flicker_spec.rb
tdiary-contrib-5.0.11 spec/flicker_spec.rb