Commit 4771aeeb by David Chen Committed by Jon Yurek

AWS S3 service change, status is 403 when accessing deleted object instead of 404

parent ccaaaad6
...@@ -140,7 +140,7 @@ unless ENV["S3_BUCKET"].blank? ...@@ -140,7 +140,7 @@ unless ENV["S3_BUCKET"].blank?
it "is destroyable" do it "is destroyable" do
url = @dummy.avatar.url url = @dummy.avatar.url
@dummy.destroy @dummy.destroy
assert_not_found_response url assert_forbidden_response url
end end
end end
......
...@@ -61,6 +61,13 @@ module Assertions ...@@ -61,6 +61,13 @@ module Assertions
end end
end end
def assert_forbidden_response(url)
Net::HTTP.get_response(URI.parse(url)) do |response|
assert_equal "403", response.code,
"Expected HTTP response code 403, got #{response.code}"
end
end
def assert_frame_dimensions(range, frames) def assert_frame_dimensions(range, frames)
frames.each_with_index do |frame, frame_index| frames.each_with_index do |frame, frame_index|
frame.split('x').each_with_index do |dimension, dimension_index | frame.split('x').each_with_index do |dimension, dimension_index |
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment