FIX: Ensure theme_uploads_local only has one / at beginning (#17719)

Followup to c7dfb1c549
This commit is contained in:
David Taylor 2022-07-28 22:20:52 +01:00 committed by GitHub
parent c7dfb1c549
commit 9d753cb89e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -12,7 +12,7 @@ class JavascriptCache < ActiveRecord::Base
end
def local_url
"#{Discourse.base_path}/#{path}"
"#{Discourse.base_path}#{path}"
end
private

View File

@ -504,6 +504,7 @@ HTML
expect(val["theme_uploads"]["test_js"]).to eq(js_field.upload.url)
expect(val["theme_uploads_local"]["test_js"]).to eq(js_field.javascript_cache.local_url)
expect(val["theme_uploads_local"]["test_js"]).to start_with("/theme-javascripts/")
end