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:
parent
916b556db5
commit
1dca25f490
1 changed files with 14 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue