fix broken build

This commit is contained in:
Sam 2013-07-24 17:24:28 +10:00
parent 366cb13140
commit 0a7bbb08e1
2 changed files with 2 additions and 2 deletions

View file

@ -164,7 +164,7 @@ class CookedPostProcessor
filename = get_filename(upload, img['src']) filename = get_filename(upload, img['src'])
informations = "#{original_width}x#{original_height}" informations = "#{original_width}x#{original_height}"
informations << " #{number_to_human_size(upload.filesize)}" if upload informations << " #{number_to_human_size(upload.filesize)}" if upload
meta.add_child create_span_node("filename", filename) meta.add_child create_span_node("filename", filename)
meta.add_child create_span_node("informations", informations) meta.add_child create_span_node("informations", informations)

View file

@ -138,7 +138,7 @@ describe CookedPostProcessor do
it "generates overlay information" do it "generates overlay information" do
cpp.post_process_images cpp.post_process_images
cpp.html.should match_html '<div><a href="http://test.localhost/uploads/default/1/1234567890123456.jpg" class="lightbox"><img src="http://test.localhost/uploads/default/_optimized/da3/9a3/ee5e6b4b0d3_100x200.jpg" width="690" height="1380"><div class="meta"> cpp.html.should match_html '<div><a href="http://test.localhost/uploads/default/1/1234567890123456.jpg" class="lightbox"><img src="http://test.localhost/uploads/default/_optimized/da3/9a3/ee5e6b4b0d3_100x200.jpg" width="690" height="1380"><div class="meta">
<span class="filename">uploaded.jpg</span><span class="informations">1000x2000 1.21 KB</span><span class="expand"></span> <span class="filename">uploaded.jpg</span><span class="informations">1000x2000 1.21 KB</span><span class="expand"></span>
</div></a></div>' </div></a></div>'
cpp.should be_dirty cpp.should be_dirty
end end