evazion
2019-09-08 15:32:31 -05:00
parent 22fd90eee9
commit 24202d51f0
4 changed files with 42 additions and 25 deletions

View File

@@ -199,6 +199,13 @@ class ApplicationControllerTest < ActionDispatch::IntegrationTest
assert_equal("max-age=#{1.day}, private", response.headers["Cache-Control"])
end
should "support the expires_in parameter" do
get posts_path, as: :json, params: { expires_in: "5min" }
assert_response :success
assert_equal("max-age=#{5.minutes}, private", response.headers["Cache-Control"])
end
should "return the correct root element name for empty xml responses" do
get tags_path, as: :xml