So I wanted to write a test to show the problem. Here's what we wound up with... easy, once you know what on earth that is called:
def test_image_display
get :image, {:id => "28"}, {:session_id => "3"}
assert_equal "image/jpg", @response.content_type
end
This should work for non-image MIME types as well - XML, etc. - although I've only tried images so far.
No comments:
Post a Comment