Permalink
Browse files

Merge pull request #1439 from epdejager/aws_storage_mock_fix

Aws storage mock fix
  • Loading branch information...
2 parents a5650fd + 1dca25f commit 4e047e9d30136fa7182fa37b1ffef85443d0f11b @geemus geemus committed Jan 3, 2013
Showing with 18 additions and 1 deletion.
  1. +4 −1 lib/fog/aws/storage.rb
  2. +14 −0 tests/aws/requests/storage/bucket_tests.rb
View
@@ -193,7 +193,10 @@ def self.data
:bucket => {},
:object => {}
},
- :buckets => {}
+ :buckets => {},
+ :cors => {
+ :bucket => {}
+ }
}
end
end
@@ -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 4e047e9

Please sign in to comment.