aboutsummaryrefslogtreecommitdiffstats
path: root/activestorage/test/models/attached
diff options
context:
space:
mode:
authorGeorge Claghorn <george.claghorn@gmail.com>2018-07-20 16:24:27 -0400
committerGitHub <noreply@github.com>2018-07-20 16:24:27 -0400
commit205aa1462acb038df8f434e941d2a4d68f36acf5 (patch)
tree75060f917e38c84a410df43ee74c0e1a30234120 /activestorage/test/models/attached
parent7b3ead3b26682ee331e0e67eb4e3962742f9aa5e (diff)
parent6c45b04a7399bb629bf17319dc3519a061d4d7a0 (diff)
downloadrails-205aa1462acb038df8f434e941d2a4d68f36acf5.tar.gz
rails-205aa1462acb038df8f434e941d2a4d68f36acf5.tar.bz2
rails-205aa1462acb038df8f434e941d2a4d68f36acf5.zip
Merge pull request #33405 from georgeclaghorn/activestorage-referential-integrity
Add a foreign-key constraint to the active_storage_attachments table for blobs
Diffstat (limited to 'activestorage/test/models/attached')
-rw-r--r--activestorage/test/models/attached/many_test.rb2
-rw-r--r--activestorage/test/models/attached/one_test.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/activestorage/test/models/attached/many_test.rb b/activestorage/test/models/attached/many_test.rb
index 82be88af08..334254d099 100644
--- a/activestorage/test/models/attached/many_test.rb
+++ b/activestorage/test/models/attached/many_test.rb
@@ -10,7 +10,7 @@ class ActiveStorage::ManyAttachedTest < ActiveSupport::TestCase
@user = User.create!(name: "Josh")
end
- teardown { ActiveStorage::Blob.all.each(&:purge) }
+ teardown { ActiveStorage::Blob.all.each(&:delete) }
test "attaching existing blobs to an existing record" do
@user.highlights.attach create_blob(filename: "funky.jpg"), create_blob(filename: "town.jpg")
diff --git a/activestorage/test/models/attached/one_test.rb b/activestorage/test/models/attached/one_test.rb
index 01caaf0b55..3333fd9323 100644
--- a/activestorage/test/models/attached/one_test.rb
+++ b/activestorage/test/models/attached/one_test.rb
@@ -10,7 +10,7 @@ class ActiveStorage::OneAttachedTest < ActiveSupport::TestCase
@user = User.create!(name: "Josh")
end
- teardown { ActiveStorage::Blob.all.each(&:purge) }
+ teardown { ActiveStorage::Blob.all.each(&:delete) }
test "attaching an existing blob to an existing record" do
@user.avatar.attach create_blob(filename: "funky.jpg")