Skip to content
This repository
Browse code

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

…) scenario
  • Loading branch information...
commit 1dca25f4908815b752937f507beb4fbac47cf07b 1 parent 916b556
epdejager authored
14  tests/aws/requests/storage/bucket_tests.rb
@@ -241,6 +241,20 @@
241 241
       end
242 242
     end
243 243
 
  244
+    tests("put_bucket_cors('#{@aws_bucket_name}', cors)").succeeds do
  245
+      cors =  {'CORSConfiguration' =>
  246
+                  [
  247
+                    {
  248
+                      'AllowedOrigin' => 'http://localhost:3000',
  249
+                      'AllowedMethod' => ['POST', 'GET'],
  250
+                      'AllowedHeader' => '*',
  251
+                      'MaxAgeSeconds' => 3000
  252
+                    }
  253
+                  ]
  254
+              }
  255
+      Fog::Storage[:aws].put_bucket_cors(@aws_bucket_name, cors)
  256
+    end
  257
+
244 258
     tests("#delete_bucket('#{@aws_bucket_name}')").succeeds do
245 259
       Fog::Storage[:aws].delete_bucket(@aws_bucket_name)
246 260
     end

0 notes on commit 1dca25f

Please sign in to comment.
Something went wrong with that request. Please try again.