mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 16:21:18 +08:00
REFACTOR: upload workflow creation into UploadCreator
- Automatically convert large-ish PNG/BMP to JPEG - Updated fast_image to latest version
This commit is contained in:
@ -171,7 +171,7 @@ HTML
|
||||
|
||||
it 'can handle uploads based of ThemeField' do
|
||||
theme = Theme.new(name: 'theme', user_id: -1)
|
||||
upload = Upload.create_for(-1, image, "logo.png", File.size(image))
|
||||
upload = UploadCreator.new(image, "logo.png").create_for(-1)
|
||||
theme.set_field(target: :common, name: :logo, upload_id: upload.id, type: :theme_upload_var)
|
||||
theme.set_field(target: :common, name: :scss, value: 'body {background-image: url($logo)}')
|
||||
theme.save!
|
||||
|
Reference in New Issue
Block a user