mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Add ActiveStorage::Service::DiskService#url_for_direct_upload test
This commit is contained in:
parent
c9fa561b2e
commit
a21d11ce80
1 changed files with 4 additions and 0 deletions
|
@ -11,4 +11,8 @@ class ActiveStorage::Service::DiskServiceTest < ActiveSupport::TestCase
|
|||
assert_match(/rails\/active_storage\/disk\/.*\/avatar\.png\?content_type=image%2Fpng&disposition=inline/,
|
||||
@service.url(FIXTURE_KEY, expires_in: 5.minutes, disposition: :inline, filename: ActiveStorage::Filename.new("avatar.png"), content_type: "image/png"))
|
||||
end
|
||||
|
||||
test "headers_for_direct_upload generation" do
|
||||
assert_equal({ "Content-Type" => "application/json" }, @service.headers_for_direct_upload(FIXTURE_KEY, content_type: "application/json"))
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue