1
0
Fork 0
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:
Kevin Menard 2012-01-26 14:15:22 -05:00
parent df503d6ab8
commit 4899785ec5

View file

@ -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)