FIX: consistent and future-proof upload storage pattern

This commit is contained in:
Régis Hanol
2015-05-19 12:31:12 +02:00
parent 666b5b40a5
commit 9ded21e4c6
10 changed files with 28 additions and 67 deletions

View File

@ -309,7 +309,7 @@ This is a link http://example.com"
receiver.process
expect(topic.posts.count).to eq(start_count + 1)
expect(topic.posts.last.cooked).to match /<img src=['"](\/uploads\/default\/\d+\/\w{16}\.png)['"] width=['"]289['"] height=['"]126['"]>/
expect(topic.posts.last.cooked).to match /<img src=['"](\/uploads\/default\/original\/#{upload_sha[0]}\/#{upload_sha[1]}\/#{upload_sha}\.png)['"] width=['"]289['"] height=['"]126['"]>/
expect(Upload.find_by(sha1: upload_sha)).not_to eq(nil)
end