mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 16:21:18 +08:00
REVERT: DEV: should ignore missing post uploads when a user export destroyed
Reverts 793915fe6aa1024b6a08cb8b042b7fb1e0bbece8. We no longer need this since we're destroying each posts in commit 028121b95b982500e0c63b11d216a6162d47a7bb.
This commit is contained in:
@ -41,22 +41,4 @@ RSpec.describe UserExport do
|
||||
expect(Topic.exists?(id: topic_2.id)).to eq(true)
|
||||
end
|
||||
end
|
||||
|
||||
describe '#destroy!' do
|
||||
it 'should create post custom field for ignored missing uploads' do
|
||||
upload = Fabricate(:upload, created_at: 3.days.ago)
|
||||
export = UserExport.create!(
|
||||
file_name: "test",
|
||||
user: user,
|
||||
upload_id: upload.id,
|
||||
created_at: 3.days.ago
|
||||
)
|
||||
post = Fabricate(:post, raw: "")
|
||||
post.link_post_uploads
|
||||
|
||||
export.destroy!
|
||||
|
||||
expect(PostCustomField.exists?(post_id: post.id, name: Post::MISSING_UPLOADS_IGNORED)).to eq(true)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user