diff options
author | George Claghorn <george@basecamp.com> | 2017-12-15 19:26:53 -0500 |
---|---|---|
committer | George Claghorn <george@basecamp.com> | 2017-12-15 19:26:53 -0500 |
commit | af0caadb8d9781770399c1804976af4a71d1313b (patch) | |
tree | 19fe95a35822990cba61915b3efd38b4ed5f1513 /activestorage/test/controllers/blobs_controller_test.rb | |
parent | ca2c4cb7c4ee2f126e65ade6192a0c6b5ec58ffc (diff) | |
download | rails-af0caadb8d9781770399c1804976af4a71d1313b.tar.gz rails-af0caadb8d9781770399c1804976af4a71d1313b.tar.bz2 rails-af0caadb8d9781770399c1804976af4a71d1313b.zip |
Handle invalid signed blob IDs gracefully
Diffstat (limited to 'activestorage/test/controllers/blobs_controller_test.rb')
-rw-r--r-- | activestorage/test/controllers/blobs_controller_test.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/activestorage/test/controllers/blobs_controller_test.rb b/activestorage/test/controllers/blobs_controller_test.rb index 97177e64c2..9c811df895 100644 --- a/activestorage/test/controllers/blobs_controller_test.rb +++ b/activestorage/test/controllers/blobs_controller_test.rb @@ -8,6 +8,11 @@ class ActiveStorage::BlobsControllerTest < ActionDispatch::IntegrationTest @blob = create_file_blob filename: "racecar.jpg" end + test "showing blob with invalid signed ID" do + get rails_service_blob_url("invalid", "racecar.jpg") + assert_response :not_found + end + test "showing blob utilizes browser caching" do get rails_blob_url(@blob) |