Skip to content

Commit

Permalink
tests for image,text/html content types
Browse files Browse the repository at this point in the history
  • Loading branch information
atmos committed Feb 2, 2014
1 parent c472a1b commit aace91f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/proxy_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,12 @@ def test_proxy_valid_image_url_with_crazy_subdomain
assert_equal(200, response.code)
end

def test_strict_image_content_type_checking
assert_raise RestClient::ResourceNotFound do
request("http://calm-shore-1799.herokuapp.com/foo.png")
end
end

def test_proxy_valid_google_chart_url
response = request('http://chart.apis.google.com/chart?chs=920x200&chxl=0:%7C2010-08-13%7C2010-09-12%7C2010-10-12%7C2010-11-11%7C1:%7C0%7C0%7C0%7C0%7C0%7C0&chm=B,EBF5FB,0,0,0&chco=008Cd6&chls=3,1,0&chg=8.3,20,1,4&chd=s:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA&chxt=x,y&cht=lc')
assert_equal(200, response.code)
Expand Down

0 comments on commit aace91f

Please sign in to comment.