Issue#17703 Test case for tempfile attribute

+ To avoid regression I am adding this test case on action pack though the issue is not from rails side.