test/post_test.rb in fakes3-1.2.1 vs test/post_test.rb in fakes3-1.3.0
- old
+ new
@@ -27,10 +27,12 @@
'success_action_redirect'=>'http://somewhere.else.com/?foo=bar',
'file'=>File.new(__FILE__,"rb")
) { |response|
assert_equal(response.code, 303)
assert_equal(response.headers[:location], 'http://somewhere.else.com/?foo=bar&bucket=posttest&key=uploads%2F12345%2Fpost_test.rb')
+ # Tests that CORS Headers can be set from command line
+ assert_equal(response.headers[:access_control_allow_headers], 'Authorization, Content-Length, Cache-Control')
}
end
def test_status_200
res = RestClient.post(
@@ -38,10 +40,12 @@
'key'=>'uploads/12345/${filename}',
'success_action_status'=>'200',
'file'=>File.new(__FILE__,"rb")
) { |response|
assert_equal(response.code, 200)
+ # Tests that CORS Headers can be set from command line
+ assert_equal(response.headers[:access_control_allow_headers], 'Authorization, Content-Length, Cache-Control')
}
end
def test_status_201
res = RestClient.post(
@@ -50,9 +54,11 @@
'success_action_status'=>'201',
'file'=>File.new(__FILE__,"rb")
) { |response|
assert_equal(response.code, 201)
assert_match(%r{^\<\?xml.*uploads/12345/post_test\.rb}m, response.body)
+ # Tests that CORS Headers can be set from command line
+ assert_equal(response.headers[:access_control_allow_headers], 'Authorization, Content-Length, Cache-Control')
}
end
end