Sha256: dd9f3eea18d2d33f2d1b576003407fd8e624cc8bf6296ac574883d3783951f7d
Contents?: true
Size: 1.47 KB
Versions: 34
Compression:
Stored size: 1.47 KB
Contents
require "spec_helper" describe Onebox::Engine::ImageOnebox do it "supports png" do Onebox.preview('http://www.discourse.org/images/logo.png').to_s.should match(/<img/) end it "supports jpg" do Onebox.preview('http://upload.wikimedia.org/wikipedia/en/a/a9/Example.jpg').to_s.should match(/<img/) end it "supports jpeg" do Onebox.preview('http://upload.wikimedia.org/wikipedia/en/b/bb/Poster.jpeg').to_s.should match(/<img/) end it "supports gif" do Onebox.preview('http://upload.wikimedia.org/wikipedia/commons/5/55/Tesseract.gif').to_s.should match(/<img/) end it "supports tif" do Onebox.preview('http://www.fileformat.info/format/tiff/sample/1f37bbd5603048178487ec88b1a6425b/MARBLES.tif').to_s.should match(/<img/) end it "supports bmp" do Onebox.preview('http://www.fileformat.info/format/bmp/sample/d4202a5fc22a48c388d9e1c636792cc6/LAND.BMP').to_s.should match(/<img/) end it "supports image URLs with query parameters" do Onebox.preview('https://www.google.com/logos/doodles/2014/percy-julians-115th-birthday-born-1899-5688801926053888-hp.jpg?foo=bar').to_s.should match(/<img/) end it "supports protocol relative image URLs" do Onebox.preview('//www.google.com/logos/doodles/2014/percy-julians-115th-birthday-born-1899-5688801926053888-hp.jpg').to_s.should match(/<img/) end it "includes a direct link to the image" do Onebox.preview('http://www.discourse.org/images/logo.png').to_s.should match(/<a.*png/) end end
Version data entries
34 entries across 34 versions & 1 rubygems