2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-10 12:04:21 +08:00

FEATURE: new rake task to clean up uploads & thumbnails

This commit is contained in:
Régis Hanol 2014-09-29 18:31:53 +02:00
parent 5d91a4ef0c
commit 652cc3efba
8 changed files with 76 additions and 39 deletions

View file

@ -9,6 +9,7 @@ describe FileStore::LocalStore do
let(:uploaded_file) { file_from_fixtures("logo.png") }
let(:optimized_image) { build(:optimized_image) }
let(:avatar) { build(:upload) }
describe ".store_upload" do
@ -31,15 +32,6 @@ describe FileStore::LocalStore do
end
describe ".store_avatar" do
it "returns a relative url" do
store.expects(:copy_file)
store.store_avatar({}, upload, 100).should == "/uploads/default/avatars/e9d/71f/5ee7c92d6d/100.png"
end
end
describe ".remove_upload" do
it "does not delete non uploaded" do