mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
[aws|storage|test] Added versioning test for Files#head.
This commit is contained in:
parent
df503d6ab8
commit
4899785ec5
1 changed files with 14 additions and 0 deletions
|
@ -36,6 +36,20 @@ Shindo.tests("Storage[:aws] | files", [:aws]) do
|
|||
end
|
||||
end
|
||||
|
||||
tests("#head") do
|
||||
tests("#head without version fetches the latest version").returns(v4) do
|
||||
@directory.files.head(@instance.key).version
|
||||
end
|
||||
|
||||
tests("#head with version fetches that exact version").returns(v2) do
|
||||
@directory.files.head(@instance.key, 'versionId' => v2).version
|
||||
end
|
||||
|
||||
tests("#head with a deleted version returns nil").returns(nil) do
|
||||
@directory.files.head(@instance.key, 'versionId' => v3)
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@directory.versions.each(&:destroy)
|
||||
|
|
Loading…
Reference in a new issue