aboutsummaryrefslogtreecommitdiffstats
path: root/activestorage
diff options
context:
space:
mode:
authorJon Moss <me@jonathanmoss.me>2017-08-17 09:35:24 -0400
committerJon Moss <me@jonathanmoss.me>2017-08-17 11:09:33 -0400
commit267fdcc4a4de0675fb4fffdbc1b711b2146a6ea6 (patch)
treeeacf54b6ee268fb0b19c653ee8c7030c1c7fbde4 /activestorage
parentf84019cd6338576986b71a419602bfd6bc546f2d (diff)
downloadrails-267fdcc4a4de0675fb4fffdbc1b711b2146a6ea6.tar.gz
rails-267fdcc4a4de0675fb4fffdbc1b711b2146a6ea6.tar.bz2
rails-267fdcc4a4de0675fb4fffdbc1b711b2146a6ea6.zip
Add missing test for Blob#purge
Diffstat (limited to 'activestorage')
-rw-r--r--activestorage/test/models/blob_test.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/activestorage/test/models/blob_test.rb b/activestorage/test/models/blob_test.rb
index 1c50d18994..99f2fb20b0 100644
--- a/activestorage/test/models/blob_test.rb
+++ b/activestorage/test/models/blob_test.rb
@@ -41,6 +41,13 @@ class ActiveStorage::BlobTest < ActiveSupport::TestCase
end
end
+ test "purge removes from external service" do
+ blob = create_blob
+
+ blob.purge
+ assert_not ActiveStorage::Blob.service.exist?(blob.key)
+ end
+
private
def expected_url_for(blob, disposition: :inline)
query_string = { content_type: blob.content_type, disposition: disposition }.to_param