display the size of the attachment in the preview

instead of adding it during post processing
This commit is contained in:
Régis Hanol
2013-07-14 12:28:24 +02:00
parent 6f2ce93ab2
commit 3397c2235f
21 changed files with 197 additions and 25 deletions

View File

@ -34,8 +34,6 @@ describe CookedPostProcessor do
cpp.html.should =~ /#{LocalStore.base_url}/
# ensure name is present
cpp.html.should =~ /archive.zip/
# ensure size is present
cpp.html.should =~ /<span class=\"size\">\(1.21 KB\)<\/span>/
# dirty
cpp.should be_dirty
# keeps the reverse index up to date
@ -79,8 +77,6 @@ describe CookedPostProcessor do
cpp.post_process_images
# ensures absolute urls on uploaded images
cpp.html.should =~ /#{LocalStore.base_url}/
# dirty
cpp.should be_dirty
# keeps the reverse index up to date
post.uploads.reload
post.uploads.count.should == 1