1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

Added a test for put_bucket_cors to make sure it runs in a test (mock) scenario

This commit is contained in:
epdejager 2013-01-03 12:41:34 +02:00
parent 916b556db5
commit 1dca25f490

View file

@ -241,6 +241,20 @@ Shindo.tests('Fog::Storage[:aws] | bucket requests', ["aws"]) do
end
end
tests("put_bucket_cors('#{@aws_bucket_name}', cors)").succeeds do
cors = {'CORSConfiguration' =>
[
{
'AllowedOrigin' => 'http://localhost:3000',
'AllowedMethod' => ['POST', 'GET'],
'AllowedHeader' => '*',
'MaxAgeSeconds' => 3000
}
]
}
Fog::Storage[:aws].put_bucket_cors(@aws_bucket_name, cors)
end
tests("#delete_bucket('#{@aws_bucket_name}')").succeeds do
Fog::Storage[:aws].delete_bucket(@aws_bucket_name)
end