FIX: All multisite upload paths should start with /uploads/default/.. (#6707)

This commit is contained in:
Rishabh
2018-12-03 09:34:14 +05:30
committed by Guo Xiang Tan
parent 6121d11187
commit 503ae1829f
3 changed files with 8 additions and 4 deletions

View File

@ -27,9 +27,11 @@ RSpec.describe 'Multisite s3 uploads', type: :multisite do
describe "#store_upload" do
it "returns the correct url for default and second multisite db" do
expect(store.store_upload(uploaded_file, upload)).to eq(
"//#{SiteSetting.s3_upload_bucket}.s3.dualstack.us-east-1.amazonaws.com/original/1X/c530c06cf89c410c0355d7852644a73fc3ec8c04.png"
)
conn.with_connection('default') do
expect(store.store_upload(uploaded_file, upload)).to eq(
"//#{SiteSetting.s3_upload_bucket}.s3.dualstack.us-east-1.amazonaws.com/uploads/default/original/1X/c530c06cf89c410c0355d7852644a73fc3ec8c04.png"
)
end
conn.with_connection('second') do
expect(store.store_upload(uploaded_file, upload)).to eq(