Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #1439 from epdejager/aws_storage_mock_fix

Aws storage mock fix
  • Loading branch information...
commit 4e047e9d30136fa7182fa37b1ffef85443d0f11b 2 parents a5650fd + 1dca25f
@geemus geemus authored
View
5 lib/fog/aws/storage.rb
@@ -193,7 +193,10 @@ def self.data
:bucket => {},
:object => {}
},
- :buckets => {}
+ :buckets => {},
+ :cors => {
+ :bucket => {}
+ }
}
end
end
View
14 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
Please sign in to comment.
Something went wrong with that request. Please try again.