Permalink
Browse files

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

…) scenario
  • Loading branch information...
epdejager committed Jan 3, 2013
1 parent 916b556 commit 1dca25f4908815b752937f507beb4fbac47cf07b
Showing with 14 additions and 0 deletions.
  1. +14 −0 tests/aws/requests/storage/bucket_tests.rb
@@ -241,6 +241,20 @@
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

0 comments on commit 1dca25f

Please sign in to comment.