DEV: Clean up S3 specs, stubs, and helpers

Extracted commonly used spec helpers into spec/support/uploads_helpers.rb, removed unused stubs and let definitions. Makes it easier to write new S3-related specs without copy and pasting setup steps from other specs.
This commit is contained in:
Jarek Radosz
2020-09-14 13:32:25 +02:00
committed by Daniel Waterworth
parent 50d53508b1
commit e00abbe1b7
38 changed files with 237 additions and 444 deletions

View File

@ -12,10 +12,7 @@ RSpec.describe UploadSecurity do
context "when secure media is enabled" do
before do
SiteSetting.enable_s3_uploads = true
SiteSetting.s3_upload_bucket = "s3-upload-bucket"
SiteSetting.s3_access_key_id = "some key"
SiteSetting.s3_secret_access_key = "some secrets3_region key"
setup_s3
SiteSetting.secure_media = true
end