aboutsummaryrefslogtreecommitdiffstats
path: root/activestorage/test/controllers/disk_controller_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activestorage/test/controllers/disk_controller_test.rb')
-rw-r--r--activestorage/test/controllers/disk_controller_test.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/activestorage/test/controllers/disk_controller_test.rb b/activestorage/test/controllers/disk_controller_test.rb
index 32b930730d..c053052f6f 100644
--- a/activestorage/test/controllers/disk_controller_test.rb
+++ b/activestorage/test/controllers/disk_controller_test.rb
@@ -67,4 +67,10 @@ class ActiveStorage::DiskControllerTest < ActionDispatch::IntegrationTest
assert_response :unprocessable_entity
assert_not blob.service.exist?(blob.key)
end
+
+ test "directly uploading blob with invalid token" do
+ put update_rails_disk_service_url(encoded_token: "invalid"),
+ params: "Something else entirely!", headers: { "Content-Type" => "text/plain" }
+ assert_response :not_found
+ end
end