mirror of
https://github.com/discourse/discourse.git
synced 2025-01-30 17:08:30 +08:00
DEV: Improve specs for 293cf600f0
.
This commit is contained in:
parent
293cf600f0
commit
d403883d16
|
@ -85,6 +85,9 @@ RSpec.describe UploadRecovery do
|
|||
expect do
|
||||
upload_recovery.recover
|
||||
end.to change { post.reload.uploads.count }.from(0).to(1)
|
||||
|
||||
expect(File.read(Discourse.store.path_for(post.uploads.first)))
|
||||
.to eq(File.read(file_from_fixtures("small.pdf", "pdf")))
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -99,6 +102,9 @@ RSpec.describe UploadRecovery do
|
|||
expect do
|
||||
upload_recovery.recover
|
||||
end.to change { post.reload.uploads.count }.from(0).to(1)
|
||||
|
||||
expect(File.read(Discourse.store.path_for(post.uploads.first)))
|
||||
.to eq(File.read(file_from_fixtures("smallest.png")))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue
Block a user