mirror of
https://github.com/discourse/discourse.git
synced 2024-12-05 10:26:17 +08:00
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
|