mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Test basic upload
This commit is contained in:
parent
8e4e9741a8
commit
1e05e62856
1 changed files with 8 additions and 0 deletions
|
@ -19,6 +19,14 @@ class ActiveFile::DiskSiteTest < ActiveSupport::TestCase
|
|||
FIXTURE_FILE.rewind
|
||||
end
|
||||
|
||||
test "uploading" do
|
||||
key = SecureRandom.base58(24)
|
||||
data = "Something else entirely!"
|
||||
@site.upload(key, StringIO.new(data))
|
||||
|
||||
assert_equal data, @site.download(key)
|
||||
end
|
||||
|
||||
test "downloading" do
|
||||
assert_equal FIXTURE_FILE.read, @site.download(FIXTURE_KEY)
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue