mirror of
https://github.com/discourse/discourse.git
synced 2024-11-24 22:09:35 +08:00
e4a76812a6
shrunk avatar to 60px, added global whitelisting
18 lines
494 B
Ruby
18 lines
494 B
Ruby
require 'spec_helper'
|
|
require 'oneboxer'
|
|
require 'oneboxer/handlebars_onebox'
|
|
|
|
describe Oneboxer::HandlebarsOnebox do
|
|
H = Oneboxer::HandlebarsOnebox
|
|
|
|
describe 'simple onebox' do
|
|
it "is able to render image size when specified" do
|
|
template = H.template_path('simple_onebox')
|
|
result = H.generate_onebox(template, 'image_width' => 100, 'image_height' => 100, image: 'http://my.com/image.png')
|
|
|
|
result.should =~ /width=/
|
|
result.should =~ /height=/
|
|
end
|
|
end
|
|
end
|